Sail E0 Webinar
Question

What will be output if you compile following c code ?


void main()
{
char *str = "Placementadda";
printf("%d",printf("%s",str));
}


Options:
A .  Placementadda
B .  Placementadda
C .  Null
D .  It will print nothing
E .  compile error
Answer: Option E


We cannot copy anything using strcpy function to the character pointer pointing to NULL.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers