C-Programming


26. What is the output of the following code snippet?

#include<stdio.h>

int main()

{

   int x = 5;

   int y = 3;

   printf(“%d”, x || y);

   return 0;

}

a) 0

b) 1

c) 5

d) 3

View Answer >

27. What is the output of the following code snippet?

#include<stdio.h>

int main()

{

   int x = 5;

   int y = 3;

   printf(“%d”, x % y);

   return 0;

}

a) 3

b) 5

c) 8

d) 2

View Answer >

28. Which of the following is not a valid type modifier in C?

a) signed

b) float

c) const

d) volatile

View Answer >

29. What is the output of the following code snippet?

#include<stdio.h>

int main()

{

   int x = 5;

   int y = 3;

   printf(“%d”, x != y);

   return 0;

}

a) 0

b) 1

c) 5

d) 3

View Answer >

30. What is the output of the following code snippet?

#include<stdio.h>

int main()

{

   int x = 5;

   int y = 3;

   printf(“%d”, sizeof(x));

   return 0;

}

a) 2

b) 4

c) 8

d) 1

View Answer >

Leave a Comment

telegram Join Telegram
Join Now Join Now