write a c program for print your name .but,your name may be
small
letter mean print a capital letter or your name may be
capital
letter mean print a small letter .example
\\enter ur name :
sankar
The name is: SANKAR
(or)
enter your name:SAnkar
The name is:saNKAR
Answer Posted / rakesh ranjan
#include<conio.h>
#include<stdio.h>
void main()
{
char str[20],i;
printf("enter your name:");
scanf("%s",str);
for(i=0;str[i]!='\0';i++)
{
if(str[i]<=91)
str[i]+=32;
else
str[i]-=32;
printf("%c",str[i]) ;
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
In C language what is a 'dangling pointer'?
Can you explain the four storage classes in C?
What is equivalent to ++i+++j?
write an algorithm to display a square matrix.
Explain logical errors? Compare with syntax errors.
c program to compute AREA under integral
Why do we use return in c?
What is getche() function?
Describe how arrays can be passed to a user defined function
Explain the difference between getch() and getche() in c?
Who invented b language?
Tell me the use of bit field in c language?
What is the scope of local variable in c?
Which is better pointer or array?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?