Examveda
Examveda

What will be the output of the following C code?
const char str1[10]="Helloworld";
const char str2[10] = "world";
char *mat;
mat = strstr(str1, str2);
printf("The substring is:%s\n", mat);

A. The substring is:world

B. The substring is:Hello

C. The substring is:Helloworld

D. error in the code

Answer: Option A


This Question Belongs to C Program >> Arrays And Strings

Join The Discussion

Related Questions on Arrays and Strings