MCQOPTIONS
Bookmark
Saved Bookmarks
→
C Programming
→
Floating Point Issues in C Programming
→
Where are the uninitialized global variables store..
1.
Where are the uninitialized global variables stored?
A.
stack segment
B.
heap segment
C.
text segment
D.
BSS
Answer» E.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What if size is zero in the following C statement?<br><pre class="prettyprint lang-c">realloc(ptr, size)<br></pre>
What will be the output of the program:- <pre> extern int i = 5; main() ( int i=7; printf("%d",i); } </pre>
Why do we write (int *) before malloc?<br><pre class="prettyprint lang-c">int *ip = (int *)malloc(sizeof(int));<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> char *ptr = calloc(200, 2);<br> ptr = "Interview Mania";<br> printf("%s n", ptr);<br> }<br></pre>
What will be the output of the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> struct p<br> {<br> struct p *next;<br> int n;<br> };<br> int main()<br> {<br> struct p* ptr1 = malloc(sizeof(struct p));<br> ptr1->n = 1;<br> ptr1->next = malloc(sizeof(struct p));<br> printf("%d n", ptr1->next->n);<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> struct p<br> {<br> struct p *next;<br> int n;<br> };<br> int main()<br> {<br> struct p *ptr1 = calloc(1, sizeof(struct p));<br> ptr1->n = 1;<br> ptr1->next = calloc(1, sizeof(struct p));<br> printf("%d n", ptr1->next->n);<br> return 0;<br> }<br></pre>
Which of the following should be used for freeing the memory allocated in the following C code?<br><pre class="prettyprint lang-c">#include <stdio.h><br> struct p<br> {<br> struct p *next;<br> int n;<br> };<br> int main()<br> {<br> struct p *ptr1 = (struct ptr*)malloc(sizeof(struct p));<br> ptr1->n = 1;<br> ptr1->next = (struct ptr*)malloc(sizeof(struct p));<br> return 0;<br> }<br></pre>
What if size is zero in the following C statement?
Where are the uninitialized global variables stored?
What will be the output of the program:- extern int i = 5; main() ( int i=7; printf("%d",i); } </pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply