Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 is the code in while loop that returns the output of given code?

2076


How can I remove the leading spaces from a string?

1215


Here is a good puzzle: how do you write a program which produces its own source code as output?

1174


Explain c preprocessor?

1162


What is this infamous null pointer, anyway?

1107


Why can't I perform arithmetic on a void* pointer?

1161


How many types of sorting are there in c?

1114


What is a pointer on a pointer in c programming language?

1192


all c language question

2493


What is the purpose of the statement: strcat (S2, S1)?

1225


What is array of structure in c programming?

1336


How many levels of pointers have?

1102


What are the advantages of external class?

1125


How do you print an address?

1327


Why we use conio h in c?

1304