MCQOPTIONS
Bookmark
Saved Bookmarks
→
C Programming
→
Floating Point Issues in C Programming
→
What would be the output of following program ?..
1.
What would be the output of following program ?
A.
Error
B.
15
C.
60
D.
Garbage value
Answer» D. Garbage value
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What would be the output of following program ?<br><pre class="prettyprint lang-c">int x = 15;<br>main()<br>{<br> int x = 60;<br> print(" n%d", x);<br>}<br></pre>
Which of the following is the correct output for the program given below?<br><pre class="prettyprint lang-c">#include <studio.h><br>int main()<br>{<br> extern int x;<br> x = 30;<br> printf("%d n", sizeof(x));<br> return 0;<br>} </pre>
Which of the following is the correct output for the program given below?<br><pre class="prettyprint lang-c">#include <studio.h><br>int main()<br>{<br> extern int k;<br> printf("%d n", k );<br> return 0;<br>}<br>int k = 30;<br></pre>
Which of the following is the correct output for the program given below ?<br><pre class="prettyprint lang-c">#include <studio.h><br>int main()<br>{<br> extern int fun (float);<br> int k;<br> k = fun (5.74);<br> printf ("%d n", k);<br> return 0;<br>} <br>int fun (kk)<br>float kk;<br> {<br> return ((int) kk);<br> }<br></pre>
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> void fun(const int *);<br> int main()<br> {<br> const int k = 12;<br> printf("%d ", k);<br> fun(&k);<br> printf("%d", k);<br> <br> }<br> void fun(const int *k)<br> {<br> *k = 21;<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 Eighteen = 18;<br> int eighteen = 15;<br> printf("%d", eighteen);<br> return 0;<br> }<br></pre>
Will the following C code compile without any error?<br><pre class="prettyprint lang-c">#include <stdio.h><br> int main()<br> {<br> int n;<br> {<br> int n;<br> for (n = 0; n < 12; n++);<br> }<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> k = 23;<br> printf("%d n", k++);<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> const int k = 11;<br> int *p = &k;<br> *p = 22;<br> printf("%d n", k);<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> void main()<br> {<br> int m = 12;<br> float m = 12;<br> printf("%d", m)<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply