Get Off-Campus Placement Jobs Info !!!
Programs asked in Mettl Coding Round
Click To Practce List of Programs asked in Nagarro !!!

Commvault Written Test Qs.(Technical Aptitude) :: Dynamic Memory Allocation - Discussion

3 / 40

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

Asked In :: Commvault

Post Your Answer Here:     

No Discussion on this question yet!