char S;
char S[6]= " HELLO";
printf("%s ",S[6]);
output of the above program ?
(0, ASCII 0, I,unpredictable)
Answer Posted / manishsoni
This gives an error, and prg is terminated.
To slove this problem we show a program..
#include<stdio.h>
#include<conio.h>
int main()
{
char S[6]= "HELLO";
printf("%s",S);
getch();
return 0;
}
this print simple hello.
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
what are the different storage classes in c?
What language is windows 1.0 written?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What should malloc() do?
write a c program for swapping two strings using pointer
#include
How do you use a 'Local Block'?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
Can you please explain the difference between exit() and _exit() function?
Write a c program to demonstrate character and string constants?
what is the difference between 123 and 0123 in c?
What is modeling?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
The file stdio.h, what does it contain?