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

What does the message "automatic aggregate intialization is an ansi feature" mean?

0 Answers  


Can a function argument have default value?

0 Answers   Genpact,


inline function is there in c language?

4 Answers  


any string of bits of length 'n' represents a unique non- negative integer between.............?

2 Answers  


Is return a keyword in c?

0 Answers  






what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")

7 Answers   Cadence, JNTU, Zen Technologies,


what is the coding of display the factorial of a number using array and function?

1 Answers  


what would be the output of the following program main() { int a[] = {1,2,3,4,5}; int *ptr = {a,a+1,a+2,a+3,a+4}; printf("%d %d %d %d",a,*ptr,**ptr,ptr); } }

1 Answers  


how many errors in c explain deply

0 Answers  


Explain how can I convert a number to a string?

0 Answers  


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

0 Answers  


How can I automatically locate a programs configuration files in the same directory as the executable?

0 Answers  


Categories