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 / 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 |
Where are local variables stored in c?
what is a constant pointer in C
Explain Linker and Loader
What are the differences between Structures and Arrays?
Ca some one please help me with aC code to allow user enter numbers from 1 to 20 without repeating and prnt the sum of those numbers thnx
what is the most appropriate way to write a multi-statement macro?
What is || operator and how does it function in a program?
What is the difference between memcpy and memmove?
What is a static function in c?
what's the o/p int main(int n, char *argv[]) { char *s= *++argv; puts(s); exit(0); }
How can I read/write structures from/to data files?
What does do in c?