Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which of these functions is safer to use : fgets(), gets()? Why?

1115


please explain every phase in the "SDLC" in the dotnet.

2624


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1167


Explain how do you use a pointer to a function?

1116


What is volatile variable in c?

1099


How can I use a preprocessorif expression to ?

1070


What is an expression?

1066


How do you determine whether to use a stream function or a low-level function?

1132


write a program for the normal snake games find in most of the mobiles.

2265


Can we use any name in place of argv and argc as command line arguments?

1080


What are the types of pointers?

1120


What is a method in c?

1156


Why pointers are used?

1082


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1167


Explain what are preprocessor directives?

1073