C Programming Multiple Choice Questions And Answers
Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
List of Programming Full Forms
- char < int < double
- int > char > float
- char > int > float
- double > char > int
int main()
{
int a = 5;
float b;
printf("%d ", sizeof(++a + b));
printf("%d ", a);
return 0;
}
- 3 4
- 5 6
- 2 5
- 4 5
#include
#include
void display(int num, ...);
int main()
{
display(4, 'A', 'a', 'b', 'c');
return 0;
}
void display(int num, ...)
{
char c; int j;
va_list ptr;
va_start(ptr, num);
for(j=1; j<=num; j++)
{
c = va_arg(ptr, char);
printf("%c", c);
}
}
- No error and print 4 A a b c
- Error: unknown variable ptr
- No error and print A a b c
- Error: Lvalue required for parameter
- 2^16
- 2^16-1
- 2^15-1
- None of the above