Q. | What will be output of following program? #include
#include
int main(){
char *ptr1 = NULL;
char *ptr2 = 0;
strcpy(ptr1," g");
strcpy(ptr2,"shalini");
printf("\n%s %s",ptr1,ptr2);
return 0;
}
|
|||||||
|
Answer: | Option D | |
Explaination: | We cannot assign any string constant in null pointer by strcpy function. |
Discussion
Your Comments Goes here... |
Name | Discussion |
---|