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
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
How can I do peek and poke in c?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
Differentiate between functions getch() and getche().
The difference between printf and fprintf is ?
How can I manipulate strings of multibyte characters?
why do some people write if(0 == x) instead of if(x == 0)?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
how we can make 3d venturing graphics on outer interface
What is static memory allocation?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
Why can't I perform arithmetic on a void* pointer?
How can you pass an array to a function by value?
What is ctrl c called?
Is null a keyword in c?