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
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
How to draw the flowchart for structure programs?
What is the correct code to have following output in c using nested for loop?
What is a null string in c?
What are enumerated types?
How does struct work in c?
What is structure in c language?
Is swift based on c?
What is void pointers in c?
Which node is more powerful and can handle local information processing or graphics processing?
What is dynamic memory allocation?
What is variable in c example?
Can main () be called recursively?
Explain union. What are its advantages?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?