700+ câu trắc nghiệm Ngôn ngữ lập trình C có đáp án - Phần 14

What will be output of following program? #include #include #include int main() { char *ptr1 = NULL; char *ptr2 = 0; printf("\n%d", ptr2); strcpy(ptr1, "c"); strcpy(ptr2, "questions"); pr

11/25

What will be output of following program? #include #include #include int main() { char *ptr1 = NULL; char *ptr2 = 0; printf("\n%d", ptr2); strcpy(ptr1, "c"); strcpy(ptr2, "questions"); printf("\n%s %s", ptr1, ptr2); getch(); }

printf("\n%d", ptr2);

strcpy(ptr1, "c");

strcpy(ptr2, "questions");

printf("\n%s %s", ptr1, ptr2);

Giải thích

Chọn đáp án B