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


Please Help Members By Posting Answers For Below Questions

what are the different storage classes in c?

662


What language is windows 1.0 written?

573


any "C" function by default returns an a) int value b) float value c) char value d) a & b

665


What should malloc() do?

645


write a c program for swapping two strings using pointer

2094






#include { printf("Hello"); } how compile time affects when we add additional header file .

1424


How do you use a 'Local Block'?

723


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

1800


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3143


Can you please explain the difference between exit() and _exit() function?

592


Write a c program to demonstrate character and string constants?

1684


what is the difference between 123 and 0123 in c?

722


What is modeling?

647


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

1630


The file stdio.h, what does it contain?

667