Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
Technical Questions
»
Programming
void main() { char good *better, *best; printf( "%d..%d", sizeof(better), sizeof(best) ); }
1..2
4..4
4..2
2..2
Correct Answer:
4..2
Explanation:
The second pointer is of char type and not a good pointer.
← Previous Question
Next Question→
More Questions from
Programming
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.
What's the difference between the functions rand(), random(), srand() and randomize()?
What will be output when you will execute following c code? #include void main() { switch(2) { case 1L:printf("No"); case 2L:printf("%s","I"); goto Love; case 3L:printf("Please"); case 4L:Love:printf("Hi"); } }
Write a c program for linear search.
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments