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...

Read N characters in to an array . Use functions to do all
problems and pass the address of array to function.

1. Print only the alphabets . If in upper case print in
lower case vice versa.

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void fun(char *);
void main()
{
char a[50];
printf("enter the characters :");
gets(a);
fun(&a);
getch();
}
void fun(char *a)
{
char c;
for(int i=0;a[i]!='\0';i++)
{
if(a[i]>=97&&a[i]<=122)
{
c=a[i]-32;
printf("%c",c);
}
else if(a[i]>=65&&a[i]<=90)
{
c=a[i]+32;
printf("%c",c);
}
else if(a[i]==' ')
countine;
}
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a volatile keyword in c?

1112


Compare array data type to pointer data type

967


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

2107


Explain the use of keyword 'register' with respect to variables.

969


Why array is used in c?

971


What is meant by type specifiers?

1083


What are near, far and huge pointers?

1013


What is use of #include in c?

1089


Which is best linux os?

972


What is the use of extern in c?

1049


What is the most efficient way to count the number of bits which are set in an integer?

1001


Can we use visual studio for c?

1009


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1091


What are the 5 organizational structures?

970


what are # pragma staments?

2000