Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
Technical Questions
»
Programming
What is the output of this C code? #include int main() { int a = 1, b = 1; switch (a) { case a*b: printf("yes "); case a-b: printf("non"); break; } }
yes
Compile time error
yes no
Correct Answer:
Compile time error
← Previous Question
Next Question→
More Questions from
Programming
Which of the following statement is true?
How many times i value is checked in the below code? #include int main() { int i = 0; do { i++; printf( "In while loopn" ); } while (i < 3); }
void main() { char good *better, *best; printf( "%d..%d", sizeof(better), sizeof(best) ); }
Output of the Program : main() { int i = 1; while (i <= 5) { printf( "%d", i ); if (i > 2) goto here; i++; } } fun() { here : printf( "PP" ); }
Which Of The Following Statements Is Most Accurate For The Declaration X = Circle()?
What is the output of this C code? #include void main() { int y = 3; int x = 5 % 2 * 3 / 2; printf("Value of x is %d", x); }
What is the output of this C code? #include void main() { int x = 1, z = 3; int y = x << 3; printf( "%dn", y ); }
What would be the output of the following program ? main() { const int x = 5; int *ptrx; ptrx = &x; *ptr = 10; printf ("%d", x); }
Point out the error in the following program. main() { char mybuf[] = "Zanzibar" ; char yourbuf[] = " Zienckewiz"; char * const ptr = mybuf; *ptr = 'a'; ptr = yourbuf; }
What do the functions atoi(), itoa() and gcvt () do? Show how would you use them in a program.
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments