Вы находитесь на странице: 1из 3

Que-1: What will be the output of the following code snippet?

Int main(){
int i=7;
for(i=5; i !=0 ; i-=2){
printf(“%d”,i);
}
}

Que-2: What will be the output of the following code snippet?


Int main(){
int x = printf(“developers ”);
printf(“%d”,x);
}

Que-3: What will be the output of the following code snippet?


Int main(){
int k;
int x = scanf(“%d”,&k);
printf(“%d”,x);
}

Que-4: What will be the output of the following code snippet?


Int main(){
int b=1,c=2,d=3,e=4;
e=0;
if(b,c,d,e){
printf(“Hello World!”);
}else{
printf(“Hello India!”);
}
}
Que-5: Find all possible values of x,for which output of the following code is “Namaste
India”?
switch(x){
case 13:
case 14:
case 15:
printf(“Hello ”);
break;
case 16:
case 17:
printf(“Hi ! ”);
break;
case 18:
case 19:
printf(“Namaste ”);
default:
printf(“India ”);
}

Que-6: Predict the output of following code


int main(){
int x=6,y=7,z=7;
int res = x+y==z;
printf(“%d”,res);
}

Que-7: Predict the output of following code


int main(){
char str[] = "I am a programmer.";
printf("%s",str+3);
}

Que-8: Predict the output of following code


#include<stdio.h>

main()
{
printf("%d", -1<<1 );
}
Que-9: How many main() function we can have in our project?

Que-10: Predict the output of following code


int main()
{
int x = 10;
{
int x = 0;
printf("%d",x);
}
return 0;
}

Вам также может понравиться