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
When should the const modifier be used?
What is a static variable in c?
What is the best way to store flag values in a program?
Can you return null in c?
Is it acceptable to declare/define a variable in a c header?
What are the main characteristics of c language describe the structure of ac program?
How many levels of indirection in pointers can you have in a single declaration?
What is variables in c?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Can we replace the struct function in tree syntax with a union?
regarding pointers concept
What is the scope of an external variable in c?
What are pointers?
How can I get back to the interactive keyboard if stdin is redirected?
Is this program statement valid? INT = 10.50;