Operators
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int k = 3;
int L = ++k + k;
printf("%d\n", L);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
8
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int k = 12;
int *ptr = &k;
printf("%d\n", *ptr++);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
12
- What will be the output of the following C code?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
3 4 4
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
int num1 = 99;
int num2 = sizeof(num1++);
printf("num1 is %d", num1);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
num1 is 99
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int n1 = 2, n2 = 2, n3;
n3 = n1++ + n2;
printf("%d, %d", n1, n2);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
3, 2