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

Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1100


How to draw the flowchart for structure programs?

9333


What is the correct code to have following output in c using nested for loop?

1080


What is a null string in c?

1035


What are enumerated types?

1183


How does struct work in c?

1081


What is structure in c language?

1164


Is swift based on c?

1100


What is void pointers in c?

1002


Which node is more powerful and can handle local information processing or graphics processing?

1315


What is dynamic memory allocation?

1335


What is variable in c example?

1066


Can main () be called recursively?

1116


Explain union. What are its advantages?

1077


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?

1053