File Input Output - Study Mode
[#206] 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])
}
Correct Answer
(A) helloworld 0
[#207] What will the given code result is printf("
you are"awesome " ")
Correct Answer
(C) you are "awesome"
[#208] What will be the output of the following C code? #include <stdio.h>
int main()
{
char *str = "hello, world
"
printf("%d", strlen(str))
}
Correct Answer
(C) 13
[#209] What is the meaning of the following C statement? scanf("%[^
]s", ch)
Correct Answer
(A) read all character except new line
[#210] What will be the output of the following C code? #include <stdio.h>
int main()
{
FILE *fp = stdout
int n
fprintf(fp, "%d ", 45)
fprintf(stderr, "%d ", 65)
return 0
}
Correct Answer
(B) 65 45