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 the format %10.2 mean when included in a printf statement?
read an array and search an element
Why is c called c?
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.
what is the main use of c where it can use the c
How we can insert comments in a c program?
Why c is a mother language?
What is the function of this pointer?
0 Answers Agilent, ZS Associates,
Is main() is used in the program,,see below example? void main() { int i; for(i=0;i<10;i++) main(); } Then what is the output of the program?
What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
what are threads ? why they are called light weight processes ? what is the relation between process and threads ?