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
Is it better to use malloc() or calloc()?
What is dynamic memory allocation?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
What is c variable?
What are the keywords in c?
What is the hardest programming language?
What is malloc calloc and realloc in c?
How can I automatically locate a programs configuration files in the same directory as the executable?
Explain is it valid to address one element beyond the end of an array?
how to find anagram without using string functions using only loops in c programming
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Why is #define used?
Explain what are binary trees?
where are auto variables stored? What are the characteristics of an auto variable?
main() { printf("hello"); fork(); }