Welcome to Your Quiz: Aptitude Test C Programming For Advanced Students​ Level 3

Name Email
1. What is the output of the following program?
void main()
{
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d",a++);
printf("%d",a+10);
}
2. what is the output of following program?
void main()
{
int a=80;
if(a++>80)
printf("welcome%d",a);
else
printf("hello%d",a);
}
3. What is the output of the following program?
void main()
{
int a;
a=1;
a++ * ++a;
printf("%d",a);
}
4. what is the output of following program?
#include <stdio.h>
void main()
{
int a=1;
void xyz(int , int);
xyz(++a,a++);
xyz(a++,++a);
printf("%d",a);
}
void xyz(int x, inty)
{
printf("%d%d",x,y);
}
5. what is the output of following program?
void main()
{
int a;
a=10;
a*=10+2;
printf("%d",a);
}
6. What is the output of the following program?
void main()
{
int a,b;
a=b=10;
while(a)
{
a=b++<=13;
printf("%d%d",a,b);
}
printf("%d%d",a+10,b+10);
}
7. what is the output of following program?
void main()
{
printf("One");
if(2>1)
printf("Two");
else
printf("Three");
printf("Four");
}
8. what is the output of following program?
void main()
{
int a;
a=100;
printf("%d%d",++a,a++);
}
9. What will be the output of the following program?
main( )
{
int pskills[] = { 10, 20, 30, 40, 50 };
int i, *ptr ;
ptr = pskills;
for ( i = 0 ; i <4 ; i++ )
{
fun(ptr++);
printf ("\n%", *ptr ) ;
}
}
void fun(int *i)
{
*i = *i + 1;
}
10. Can a program be invoked from another program ?
11. What is the output of the following program?
void xyz(int p1, int *p2)
{
++p1;
++*p2;
printf("%d%d",p1,*p2);
}
void main()
{
int a=10;
xyz(a++,++*(&a));
xyz(a++,++*(&a));
printf("%d",a);
}
12. What is the output of the following program?
void main()
{
int a,b;
a=b=1;
a=a++ + ++b;
b=b++ + ++a;
printf("%d%d",a,b);
}
13. What is the output of the following program?
void main()
{
int a;
a=100>90>80;
printf("%d",a);
}
14. What is the output of following program?
main()
{
extern int a=5;
printf("%d",a);
return 0;
}
15. What is the output of the following program?
void xyz(int p1, int *p2)
{
++p1;
++*p2;
printf("%d%d",p1,*p2);
}
void main()
{
int a=10;
xyz(a++,&a);
xyz(a++,&a);
printf("%d",a);
}
16. How many times the while loop will get executed?
main ( )
{
int a = 1 ;
while ( a <= 100) ;
{
printf ( a = %d, a++ ) ;
}
}
17. what is the output of following program?
void main()
{
float a;
a=6.7;
if(a==6.7)
printf("A");
else
printf("B");
}
18. What is the output of the following program?
void main()
{
int a=1;
while(a++<=1)
while(a++<=2);
printf("%d",a);
}
19. What is the output of the following program?
void main()
{
int a;
a=10;
while(a++<=15)
printf("%d",a);
printf("%d",a+10);
}
20. what is the output of following program?
void main()
{
int a;
a=1;
while(a-->=1)
while(a-->=0);
printf("%d",a);
}

Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Advanced Students​ Level 3

Please click on View Result Button to see the Result.



(Visited 508 times, 1 visits today)