Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

C Programming :: Control Instructions

Home > C Programming > Control Instructions > General Questions

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

12. What would be the output of below program if choice = 'R' ?

void main() {
switch (choice) {
case 'R': printf("RED");
case 'W': printf("WHITE");
case 'B' : prinf ("BLUE");
default: printf("ERROR");
break;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

13. What is the output of the below fragment of C code, if i = 3?

if (i >1)c = 2;
else c = 3;
switch (c) {
case 2: printf("CAUTION");
break;
case 3: printf("GOOD BYE");
break;
default : printf("TERROR");
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

14. Consider the following C program fragment.

if (marks > 80)
grad = 'A';
else if ((marks > 70) && (attendance > 75 ))
grade= 'B';
else if (attendanc < 75)
grade = 'R';
if ((marks > 60) && (attendance > 50))
grade= 'F';
else
grade = 'E'

What is the value of grade if marks = 565 and attendance = 80?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

16. The call zap(6) gives the values of zap

int zap(int n){
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Wipro 

17. Point out the error in the program

#include
int f(int a){
a > 20? return(10): return(20);
}
int main(){
int f(int);
int b;
b = f(20);
printf("%d\n",B);
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Wipro 

18. func()
{
int x=1;
if(x=1)
x=1000;
else
x=10;
return x;
}
What is the return value?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

19. What will be the result of the following program?

#include
int main()
{
int ones, twos, threes, others;
int c;
ones = twos = threes = others = 0;
while ((c = getchar ()) != EOF)
{
switch (c)
{
case '1': ++ones;
case '2': ++twos;
case '3': ++threes;
break;
default: ++others;
break;
}
}
printf ("%d %d", ones, others);
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS 

20. What will be output of following c program?

#include
int main(){
int i=0;
for(i=0;i<20;i++){
switch(i){
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default: i+=4; break;
}
printf("%d ",i);
}
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

TCS