WAP to find that given no is small or capital
Answers were Sorted based on User's Feedback
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 |
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 |
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); }
What is break statement?
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(); }
what is printf
char *p="name"; printf(p);
to convert a string without using decrement operater and string functions
# define x=1+4; main() { int x; printf("%d%d",x/2,x/4); }
Explain what is the difference between text files and binary files?
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; }
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
How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?
If you know then define #pragma?