accept character from keyboard untill the user presses the
enter key.If the user enters any character other than upper
case(A-Z)alphabets program should stop taking any input



accept character from keyboard untill the user presses the enter key.If the user enters any charac..

Answer / shrikantauti

use if condition
if(ch>=65 &&ch<=90)
{
scanf("%c",&ch);
}
else
{
break;
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********

4 Answers  


What is the purpose of sprintf() function?

0 Answers  


What is the return type of sizeof?

0 Answers  


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

0 Answers  


The __________ attribute is used to announce variables based on definitions of columns in a table?

0 Answers  






which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above

0 Answers  


suppose there are five integers write a program to find larger among them without using if- else

2 Answers  


What is s or c?

0 Answers  


How do we declare variables in c?

0 Answers  


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

0 Answers  


What is the use of a conditional inclusion statement in C?

0 Answers   Global Logic,


What is an array in c?

0 Answers  


Categories