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
Why is c not oop?
What are dangling pointers? How are dangling pointers different from memory leaks?
What are the types of data structures in c?
What are the primitive data types in c?
What is a pointer in c plus plus?
How to declare pointer variables?
How do you define CONSTANT in C?
Why do we use pointer to pointer in c?
Explain what is meant by 'bit masking'?
Which header file is used for clrscr?
How do I use strcmp?
Do you know the difference between malloc() and calloc() function?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Who is the main contributor in designing the c language after dennis ritchie?
I have seen function declarations that look like this