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
in iso what are the common technological language?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Explain what is the general form of a c program?
Stimulate calculator using Switch-case-default statement for two numbers
What are shell structures used for?
Explain high-order bytes.
What is a shell structure examples?
Apart from dennis ritchie who the other person who contributed in design of c language.
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What does the characters “r” and “w” mean when writing programs that will make use of files?
What does %c do in c?
How can you invoke another program from within a C program?
Disadvantages of C language.
What are the types of type specifiers?
What is the maximum no. of arguments that can be given in a command line in C.?