Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
char a[50];
printf("enter the string :");
for(int i=0;1;i++)
{
scanf("%c",&a[i]);
if(a[i]=='\n')
a[i]='\0'
break;
}
for(i=0;a[i]!='\0;i++)
printf("%c",a[i]);
getch();
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is an auto keyword in c?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What are the disadvantages of a shell structure?
Why do we use pointer to pointer in c?
What is the difference between formatted&unformatted i/o functions?
Do you have any idea about the use of "auto" keyword?
How can I read/write structures from/to data files?
What is the difference between typedef and #define?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
What are variables and it what way is it different from constants?
How can I determine whether a machines byte order is big-endian or little-endian?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Why c is a mother language?
Can we assign string to char pointer?
What is the difference between union and anonymous union?