What is the output of this C code?
#include <stdio.h>

Home | Discussion Forum
Taiyari24Hour

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);
}



View More Related Question

2) How will you print \n on the screen?

3) 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));
}

4) Which is more appropriate for reading in multi-word string?

5) What will be the output of the program ?

 #include<stdio.h>
int main()
{
int i;
char a[] = "\0";
if(printf("%s", a))
printf("empty string\n");
else
printf("not empty string \n");
return 0;
}

UP Gk Online Test

taiyari24hour.com

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