Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char str[11] = "hello";
    char *str1 = "world";
    strcat(str, str1);
    printf("%s %d", str, str[10]);
}

A. helloworld 0

B. helloworld anyvalue

C. worldhello 0

D. Segmentation fault/code crash

Answer: Option A


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output