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

main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }

4 Answers   Vector,


What is break statement?

0 Answers  


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

0 Answers   Microsoft,


what is printf

5 Answers   MVSR, Satyam,


char *p="name"; printf(p);

1 Answers  






to convert a string without using decrement operater and string functions

1 Answers  


# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }

5 Answers  


Explain what is the difference between text files and binary files?

0 Answers  


int main() { int i=1; switch(i) { case '1': printf("hello"); break; case 1: printf("Hi"); break; case 49: printf("Good Morning"); break; } return 0; }

3 Answers  


Ca some one please help me with aC code to allow user enter numbers from 1 to 20 without repeating and prnt the sum of those numbers thnx

4 Answers  


How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?

1 Answers  


If you know then define #pragma?

0 Answers  


Categories