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


Please Help Members By Posting Answers For Below Questions

Explain what are the standard predefined macros?

642


a program that can input number of records and can view it again the record

1474


What is the difference between pure virtual function and virtual function?

641


What are the advantages of c preprocessor?

699


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

1692






Why pointers are used?

623


What are the types of type specifiers?

613


How can I delete a file?

617


What is extern storage class in c?

502


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3130


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

711


When can you use a pointer with a function?

555


What is indirection? How many levels of pointers can you have?

650


When can a far pointer be used?

578


What Is The Difference Between Null And Void Pointer?

629