Which of The Following Data Type Is Right in C: Programming?
Which of The Following Data Type Is Right in C: Programming?
#include<stdio.h>
int main()
{
float me = 5.25;
double you = 5.25;
if(me == you)
printf("I love U");
Else
printf("I hate U");
return 0;
}
A. Compilation error
B. I love U
C. Runtime error
D. I hate U
4. What will be the output of the C
program ?
#include<stdio.h>
int main()
{
char *ptr;
printf("%d %d", sizeof(*ptr), sizeof(ptr));
return 0;
}
A. 2 4
B. 4 4
C. 1 4
D. 1 2
5. What will be the output of the C
program?
#include<stdio.h>
int main()
{
int i = 5;
int a = ++i + ++i;
printf("%d",a);
return 0;
}
• A. 14
• B. 13
• C. 12
• D. 11
6. What will be the output of the C
program?
#include<stdio.h>
int main()
{
int i = 5;
int a = ++i + ++i + ++i;
printf("%d",a);
return 0;
}
A. 24
B. 23
C. 21
D. 22
7. What will be the output of the C
program?
#include<stdio.h>
int main()
{
int i = 16;
i =! i > 15;
printf("i = %d",i);
return 0;
}
A. 16
B. 1
C. 0✔
D. Compilation error
8. What will be the output of the C
program?
#include<stdio.h>
int main()
{
int i = 5;
int a = --i + --i;
printf("%d",a);
return 0;
}
A. 8
B. 5
C. 7
D. 6
9. What will be the output of the C
program?
#include<stdio.h>
int main()
{
int i = 5;
int a = --i + --i + --i;
printf("%d",a);
return 0;
}
A. 8
B. 9
C. 7
D. 6