Answer Posted / ruchi
#include<stdio.h>
#include<conio.h>
int main()
{
char a[40],b[40];
int i=0,c,j;
printf("\nEnter the first string ");
while((a[i++]=getchar())!='\n');
for(c=0;c<i;c++)
{
b[c] = a[c];
}
for(j=0;j<i;j++)
{
printf("%c",b[j]);
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 6 No |
Post New Answer View All Answers
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Write a program to generate random numbers in c?
Is fortran still used today?
How can I access an I o board directly?
What is main function in c?
What is the difference between struct and typedef struct in c?
What is the purpose of sprintf() function?
What are the advantages of c preprocessor?
What is the easiest sorting method to use?
When was c language developed?
can we change the default calling convention in c if yes than how.........?
What is the value of uninitialized variable in c?
What is the purpose of void pointer?
What do you understand by friend-functions? How are they used?