C Programming MCQ - Printf & Scanf
11. What is the output of this program?
#include <stdio.h>
int main()
{
int x = 1, y = 2;
printf("%d", x, y);
return 0;
}
View Answer
12. What is the output of this program?
#include <stdio.h>
int main()
{
int x = 1, y = 2;
printf("%*d", x, y);
return 0;
}
View Answer
13. What is the output of this program?
#include <stdio.h>
int main()
{
char str[25];
printf(" %d ",printf("c-letsfind"));
return 0;
}
View Answer
14. What is the output of this program?
#include <stdio.h>
# define loop while(true)
int main()
{
loop;
printf("c-letsfind");
return 0;
}
View Answer
15. What is the output of this program?
#include <stdio.h>
int main()
{
printf("%d", 5.00);
return 0;
}
View Answer
16. What is the output of this program?
#include <stdio.h>
int main()
{
printf("%d",5.25);
return 0;
}
View Answer
17. What is the output of this program ?
#include <stdio.h>
int main()
{
int a = 3;
printf("%d");
return 0;
}
View Answer
18. What is the output of this program ?
#include <stdio.h>
int main()
{
char *ptr = "Hello World";
printf(ptr+2);
return 0;
}
View Answer
19. What is the output of this program 32 bit c compiler ?
#include <stdio.h>
int main()
{
int a = 1;
printf("%d %p",a,a);
return 0;
}
View Answer
20. What is the output of this program ?
#include <stdio.h>
static struct student
{
int a;
int b;
}
struct_var{2,3};
int main()
{
printf("%d %d",struct_var.a,struct_var.b);
return 0;
}
View Answer
Also check :