Question
OPERATING SYSTWM

Question 31 What is the output of this C program? #include #include void main() int mptr, *cptr mptr = (int*)malloc(sizeof(in
Question 8 1 pts If this program Hello is run from the command line as Hello 12 3 what is the output? (char 1is ascii v
Question 12 What does this C program print? #include<stdio.h> void main() int *j; int i=10; j=&i; printf(%d, *j); 10 garbag
Question 14 What is the output of this C program? #include<stdio.h> void func(int i) { static char *str[] = {one, Two, T
0 0
Add a comment Improve this question Transcribed image text
Answer #1

31. Output : 0 0

malloc() function allocates the blcok of memory. Initially, it has garbage values. But *mptr prints zero because it store the address of malloc

calloc() function initally set all the memory blocks to zero. so the *cptr prints zero

8. The program crashes

12) output 10 i Tio | Every variable has address looo j is a pointer which stores the stores the address of a variable j=&i 1

Add a comment
Know the answer?
Add Answer to:
OPERATING SYSTWM Question 31 What is the output of this C program? #include #include void main()...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT