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 / sandy880
#include<stdio.h>
#include<conio.h>
#define MAX 15
void main()
{
char arr[MAX];
int i;
clrscr();
printf("Enter your name:");
scanf("%s",arr);
for(i=0;arr[i]!='\0';i++)
{
if(arr[i]>=65&&arr[i]<=90)
{
arr[i]=arr[i]+32;
}
else if(arr[i]>=97&&arr[i]<=122)
{
arr[i]=arr[i]-32;
}
}
printf("output:%s",arr);
getch();
}
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What are the rules for the identifier?
What are near, far and huge pointers?
How would you rename a function in C?
Explain the difference between getch() and getche() in c?
write a program to generate address labels using structures?
Where in memory are my variables stored?
How do you print only part of a string?
Do you know the difference between exit() and _exit() function in c?
What are comments and how do you insert it in a C program?
What is the size of empty structure in c?
What is the ANSI C Standard?
What is New modifiers?
What is the advantage of an array over individual variables?
How do we print only part of a string in c?
Which node is more powerful and can handle local information processing or graphics processing?