Operators
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
unsigned int num = 20;
num = ~num;
printf("%d\n", num);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
20
- What will be the output of the following C code?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
6
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
int p = -6;
int s = (p++, ++p);
printf("%d\n", s);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
-4
- What will be the output of the following C code?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
7 -7 2 1
- What will be the output of the following C code?
#include <stdio.h>
void main()
{
int n = 5;
int *ptr = &n;
int *q = ptr++;
int r = ptr - q;
printf("%d", r);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
1