Q.

What will be output if you will compile and execute the following c code?
#include <stdio.h>
#include <string.h>
int main(){
char *str=NULL;
strcpy(str,"cquestionbank");
printf("%s",str); return 0;
}

A. cquestionbank
B. cquestionbank\\0
C. (null)
D. it will print nothing
Answer» C. (null)
589
0
Do you find this helpful?
2

Discussion

No comments yet

Related MCQs