Question 11
EasyWhat is the output of this program?
#include <stdio.h>
int {
x = ;
(, x++ + );
;
}
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Programming Languages
What is the output of this program?
#include <stdio.h>
int {
x = ;
(, x++ + );
;
}
5
7
6
11
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
int x = 5;
printf("%d", ++x * 2);
return 0;
}
11
12
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
char c = 'A' + 2;
printf("%c", c);
return 0;
}
B
C
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
int a[] = {1, 2, 3, 4};
printf("%d", a[1] + a[3]);
return 0;
}
5
7
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
for (int i = 0; i < 3; i++)
printf("%d", i);
return 0;
}
123
012
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
int i = 0;
while (i < 5)
i += 2;
printf("%d", i);
return 0;
}
8
4
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
printf("%d", 7 / 2 * 2);
return 0;
}
7
1
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
float f = 7 / 2;
printf("%.1f", f);
return 0;
}
4.0
3
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
int x = 3;
if (x = 0)
printf("A");
else
printf("B");
return 0;
}
Compilation error
A
Sign up free to see the answer and a step-by-step explanation.
What is the output of this program?
#include <stdio.h>
int main() {
int a = 9;
int *p = &a;
*p = 4;
printf("%d", a);
return 0;
}
9
An address
Sign up free to see the answer and a step-by-step explanation.
6
10
A2
67
6
4
0123
12
6
5
14
6
3.0
3.5
B
AB
13
4