MCQOPTIONS
Bookmark
Saved Bookmarks
→
C Programming
→
Floating Point Issues in C Programming
→
Which of the following cannot be checked in a
..
1.
Which of the following cannot be checked in a
switch - case
statement?
A.
Character
B.
Integer
C.
Float
D.
enum
Answer» D. enum
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> int main()<br> {<br> int n = 1;<br> switch (n)<br> {<br> case n:<br> printf("Case N ");<br> default:<br> printf("Default");<br> }<br> }<br></pre>
Which of the following statement are correct about the program given below?<br><pre class="prettyprint lang-c">#include <stdio.h><br>int main ( )<br>{<br> int x = 10, y = 20;<br> if (x == 15) && if (y == 20)<br> printf ("Have a nice day n");<br> return 0;<br>}<br></pre>
Which of the following statement are correct about the program given below?<br><pre class="prettyprint lang-c">#include <stdio.h><br>int main ( )<br>{<br> int a = 40, b = 50;<br> if ( a == b )<br> printf ("a is equal to b n");<br> elseif (a > b)<br> printf ("a is greater than b n");<br> elseif (a < b)<br> printf ("a is less than b n");<br> return 0;<br>}<br></pre>
Which of the following is the correct output for the program given below?<br><pre class="prettyprint lang-c">#include <stdio.h><br>int main ()<br>{<br> int a = 400, b, c;<br> if ( a >= 500)<br> b = 400;<br> c = 300;<br> printf ( "%d %d %d n" , a, b, c);<br> return 0;<br>}<br></pre>
Which of the following is the correct output for the program given below ?<br><pre class="prettyprint lang-c">#include <stdio.h><br>int main ( )<br>{<br> int k = 5;<br> switch (k)<br> {<br> case 1:<br> printf ("Good Morning n");<br> case 2:<br> printf ("Good Evening n");<br> break;<br> case 3:<br> continue;<br> default:<br> printf ("Bye n");<br> }<br> return 0;<br>}<br></pre>
Which of the following cannot be checked in a <i> switch - case </i> statement?
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input).<br><pre class="prettyprint lang-c">#include <stdio.h><br> void main()<br> {<br> char *n;<br> printf("Enter a value between 1 to 3:");<br> scanf("%s", n);<br> switch (n)<br> {<br> case "1":<br> printf("Hey");<br> break;<br> case "2":<br> printf("Hello");<br> break;<br> }<br> }<br></pre>
Comment on the output of the following C code.<br><pre class="prettyprint lang-c"> #include <stdio.h><br> int main()<br> {<br> int num = 2;<br> switch (num)<br> case 1:<br> printf("%d", num);<br> case 2:<br> printf("%d", num);<br> case 3:<br> printf("%d", num);<br> default:<br> printf("%d", num);<br> }<br></pre>
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> #define max(p) p<br> int main()<br> {<br> int n = 1;<br> switch (n)<br> {<br> case max(2):<br> printf("Right... n");<br> case max(1):<br> printf("Wrong... n");<br> break;<br> }<br> }<br></pre>
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input).<br><pre class="prettyprint lang-c">#include <stdio.h><br> void main()<br> {<br> double var;<br> printf("Enter a value between 1 to 2:");<br> scanf("%lf", &var);<br> switch (var)<br> {<br> case 1:<br> printf("1");<br> break;<br> case 2:<br> printf("2");<br> break;<br> }<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply