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 |
pgm to find middle element of linklist(in efficent manner)
write a program to print sum of each row of a 2D array.
output for following code??? main() { int x=2,y,z; x*=3+2; printf("1.%d\n",x); x*=y=z=4; printf("2.%d %d %d\n",x,y,z); x=y==z; printf("3.%d\n",x); x==(y=z); printf("%d",x); }
which operator having highest precedence? a.)+ b.)++ c.)= d.)%
Hierarchy decides which operator a) is most important b) is used first c) is fastest d) operates on largest numbers
Can a program have two main functions?
What are the disadvantages of external storage class?
every function has return the value?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
Can we declare function inside main?
Can we add pointers together?
Is c language still used?