[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Dynamic Memory Allocation - Discussion

Home > C Programming > Dynamic Memory Allocation > MCQs Questions Discussion

8 / 18

What is the output of the program on a 32 bit Operating System?

#include
#include
void main () {
double val = 12.34;
double *dp = &val;
char *cp;
cp = (char*)malloc(sizeof(char) * 20);
sprintf (cp, "hello world");
printf("%d %d %d", sizeof(cp), sizeof(dp), sizeof(val));
}

A4 4 8

B20 8 8

C11 8 8

D20 4 8

Answer: Option (Login/Signup)

Show Explanation

size of double in c is 8 bytes 

size of double in c is 8 bytes 


Asked In :: Commvault

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here