36. What is the correct way to declare a pointer in C?
a) int* ptr;
b) ptr int;
c) *ptr int;
d) int ptr;
37. 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
38. What is the output of the following code snippet?
#include<stdio.h>
int main()
{
int x = 5;
int y = 3;
if (x < y)
{
printf(“x is less”);
}
else if (x > y)
{
printf(“x is greater”);
}
else
{
printf(“x and y are equal”);
}
return 0;
}
a) x is less
b) x is greater
c) x and y are equal
d) None of the above
39. 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
40. What is the output of the following code snippet?
#include<stdio.h>
int main()
{
int x = 5;
int y = 3;
printf(“%d”, sizeof(float));
return 0;
}
a) 2
b) 4
c) 8
d) 1