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
Explain what are the standard predefined macros?
a program that can input number of records and can view it again the record
What is the difference between pure virtual function and virtual function?
What are the advantages of c preprocessor?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
Why pointers are used?
What are the types of type specifiers?
How can I delete a file?
What is extern storage class in c?
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
When can you use a pointer with a function?
What is indirection? How many levels of pointers can you have?
When can a far pointer be used?
What Is The Difference Between Null And Void Pointer?