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

Why is c not oop?

939


What are dangling pointers? How are dangling pointers different from memory leaks?

1249


What are the types of data structures in c?

1101


What are the primitive data types in c?

1022


What is a pointer in c plus plus?

1251


How to declare pointer variables?

1184


How do you define CONSTANT in C?

1221


Why do we use pointer to pointer in c?

1035


Explain what is meant by 'bit masking'?

1144


Which header file is used for clrscr?

1018


How do I use strcmp?

1034


Do you know the difference between malloc() and calloc() function?

1023


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

2148


Who is the main contributor in designing the c language after dennis ritchie?

967


I have seen function declarations that look like this

1004