How will you print \n on the screen?

Home | Discussion Forum
Taiyari24Hour

How will you print \n on the screen?



View More Related Question

1) What is the output of this C code?

#include <stdio.h>
int main()
{
char *str = "hello, world\n";
printf("%d", strlen(str));
}

2) If the two strings are identical, then strcmp() function returns

3) What is the output of this C code?

#include <stdio.h>
int main()
{
char *str = "hello";
char str1[5];
strcpy(str, str1);
printf("%s", str1);
}

4) What is the output of this C code?

#include <stdio.h>
int main()
{
char *str = "hello, world";
char *str1 = "hello, world";
if (strcmp(str, str1))
printf("equal");
else
printf("unequal");
}

5) What will be the output of the program ?

 #include<stdio.h>
int main()
{
printf(2+"C Programming MCQ on Study 2 Online\n");
return 0;
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.