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 |
What does static mean in c?
char *p="name"; printf(p);
Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /).
What is information technology.
could u able to tell about suresoft technical session
What is keyword with example?
How does memset() work in C?
What is the collection of communication lines and routers called?
What is sizeof int in c?
What do you understand by normalization of pointers?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
difference of two no's with out using - operator