C Language MCQ - English
How will you print \n on the screen?
Home | Discussion ForumHow will you print \n on the screen?
Answer : D
View More Related Question
1) What is the output of this C code?
#include <stdio.h>
#include <string.h>
int main()
{
char *str = "hello, world";
char str1[9];
strncpy(str1, str, 9);
printf("%s %d", str1, strlen(str1));
}
2) How will you print \n on the screen?
3) The library function used to find the last occurrence of a character in a string is
4) What is the output of this C code?
#include <stdio.h>
int main()
{
char str[11] = "hello";
char *str1 = "world";
strcat(str, str1);
printf("%s %d", str, str[10]);
}
5) What will be the output of the following program?
void main()
{
char str1[] = "abcd";
char str2[] = "abcd";
if(str1==str2)
printf("Equal");
else
printf("Unequal");
}