Answer Posted / valli
main()
{
char s[20],s2[20];
printf("enter the string");
scanf(" %[^\n]",s);
for(i=0;s[i];i++)
s[i]=s2[i];
s2[i]='\0';
printf("%s",s2);
}
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What is the significance of scope resolution operator?
What is the symbol indicated the c-preprocessor?
What is the equivalent code of the following statement in WHILE LOOP format?
Explain heap and queue.
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
Explain how do you sort filenames in a directory?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
Is main is user defined function?
What are the advantages of c preprocessor?
Why is struct padding needed?
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What is extern c used for?
What is integer constants?
What is double pointer?
What is malloc calloc and realloc in c?