MCQOPTIONS
Bookmark
Saved Bookmarks
→
C Programming
→
Floating Point Issues in C Programming
→
What will be the final value of n4 in the followin..
1.
What will be the final value of n4 in the following C code?
A.
8
B.
4
C.
1
D.
0
E.
None of these
Answer» D. 0
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 t1 = 8, t2 = 9, t3;<br> if (t3 = t1 = 4 || t2 > 10)<br> printf("%d", t3);<br> else<br> printf("No Output n");<br> }<br></pre>
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 p = -2, q = 5, r = 2, s;<br> s = ++p && ++q || ++r;<br> printf("%d, %d, %d, %d n", p, q, r, s);<br> return 0;<br> }<br></pre>
What will be the size of the following C structure?<br><pre class="prettyprint lang-c">#include <stdio.h><br> struct test<br> {<br> int array[10];<br> char ch;<br> };<br></pre>
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br>printf("%d", sizeof(strlen("InterviewMania")));<br></stdio.h></pre>
Which among the following is never possible in C when members in a structure are same as that in a union?<br><pre class="prettyprint lang-c">//Let P be a structure<br>//Let Q be a union<br></pre>
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> //(sizeof double = 10, float = 5, void = 4)<br> #define PI 3.14<br> int main()<br> {<br> printf("%d", sizeof(PI));<br> }<br></pre>
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> main()<br> {<br> int N = 15;<br> printf("Size of N is %d, ", sizeof(++N));<br> printf("Value of N is %d", N);<br> };<br></pre>
Which among the following is never possible in C when members are different in a structure and union?<br><pre class="prettyprint lang-c">//Let P be a structure<br>//Let Q be a union<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, b, c;<br> a = b = c =1;<br> printf ("a = %d b = %d c = %d n", ++a, b++, ++c);<br> return 0;<br>}<br></pre>
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 num = 4, k = 1;<br> do {<br> num = num++;<br> k++;<br> } while (k != 4);<br> printf("%d n", num);<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply