main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?
Answer Posted / ruchi
Turbo c will give an answer
samco system
amco system
pointer ptr is at r
by(*ptr)++ we are incrementing it by one so we get s
by ptr ++ we are incrementing the addrestion of ptr so it
will give an output amco system;
but gcc compiler will not give any answer it will print
segmentation fault
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Not all reserved words are written in lowercase. TRUE or FALSE?
How is null defined in c?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
State the difference between x3 and x[3].
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Do you know pointer in c?
largest Of three Number using without if condition?
What is %s and %d in c?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
How can I find out the size of a file, prior to reading it in?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is typedef example?
How variables are declared in c?
Explain how do you determine the length of a string value that was stored in a variable?
Is c easier than java?