WAP to find that given no is small or capital

Answers were Sorted based on User's Feedback



WAP to find that given no is small or capital..

Answer / pinky

main()
{
char ch;
scanf("%c",&ch);
if(ch>64&&ch<91)
printf("capital");
else
printf("small");
}
in scanf fn. it must be '%c' otherwise the ans wl be 'small'
always (check it)

Is This Answer Correct ?    1 Yes 0 No

WAP to find that given no is small or capital..

Answer / naresh.s

main()
{
char ch;
scanf("%d",&ch);
if(ch>64&&ch<91)
printf("capital");
else
printf("small");
}

Is This Answer Correct ?    2 Yes 2 No

WAP to find that given no is small or capital..

Answer / mukesh

how a number could be small or CAPITAL

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are pointers? What are stacks and queues?

0 Answers   Hexaware,


Method Overloading exist in c ?

3 Answers   Wipro,


how to build a exercise findig min number of e heap with list imlemented?

0 Answers  


Why is %d used in c?

0 Answers  


Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.

3 Answers   Google,






What is 02d in c?

0 Answers  


Write a function in c to find the area of a triangle whose length of three sides is given.

2 Answers  


What is static memory allocation?

0 Answers  


I heard that you have to include stdio.h before calling printf. Why?

0 Answers  


write a c prog for removing duplicate character from an array and sorting remaining elements using a single array

1 Answers  


C,c++, Java is all are structural oriented or procedure oriented language..?

6 Answers  


Are there any problems with performing mathematical operations on different variable types?

0 Answers  


Categories