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.



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

Answer / 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

More C Interview Questions

How can you be sure that a program follows the ANSI C standard?

0 Answers   Aspire, Infogain,


Explain what is operator promotion?

0 Answers  


What is the code in while loop that returns the output of given code?

0 Answers  


program to find the ASCII value of a number

8 Answers  


What is the use of define in c?

0 Answers  


How can you print HELLO WORLD without using "semicolon"?

7 Answers   HCL, Infosys,


write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1

3 Answers  


How can I sort a linked list?

0 Answers  


How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?

1 Answers  


Reverse the bit order in a single macro. eg. i/p = 10010101 --> o/p = 10101001

2 Answers  


Write a simple program to find the size of different basic data types in C.

3 Answers  


What is indirection in c?

0 Answers  


Categories