Question 21
Output of following C code will be?
#include <stdio.h>
int main() {
int x = 10;
int y = (x++, x++, x++);
printf("%d %d\n", x, y);
return 0;
}
Question 22
Output of following C code will be?
#include <stdio.h>
int main() {
int y = 0;
int x = (y != 0);
printf("%d", x);
return 0;
}
Question 23
Output of following C code will be?
#include <stdio.h>
int main()
{
int a = 0;
int b;
a = (a == (a == 1));
printf("%d", a);
return 0;
}
Question 24
Output of following C code will be?
#include <stdio.h>
#include <stdlib.h>
int top = 0;
char fun1()
{
char a[] = {'a', 'b', 'c', '(', 'd'};
return a[top++];
}
int main()
{
char b[10];
char ch2;
int i = 0;
while ((ch2 = fun1()) != '(')
{
b[i++] = ch2;
}
b[i] = '\0'; // Add null-terminating character to mark the end of the string
printf("%s", b);
return 0;
}
Question 25
Question 26
Question 27
Question 28
#include \"stdio.h\"
void foo(void)
{
printf(\"Geeks\");
}
void bar(void)
{
printf(\"Quiz\");
}
int main()
{
foo(), bar();
return 0;
}
Question 29
#includemain( ) { unsigned int num; int i; scanf (“%u”, &num); for ( i = 0; i<16; i++) { printf (“%d”, (num << i & 1 << 15 ) ? 1:0); } }
There are 41 questions to complete.