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


Please Help Members By Posting Answers For Below Questions

Not all reserved words are written in lowercase. TRUE or FALSE?

986


How is null defined in c?

860


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.

2015


State the difference between x3 and x[3].

835


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

2080


Do you know pointer in c?

803


largest Of three Number using without if condition?

1260


What is %s and %d in c?

752


"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

885


How can I find out the size of a file, prior to reading it in?

880


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1055


What is typedef example?

844


How variables are declared in c?

783


Explain how do you determine the length of a string value that was stored in a variable?

914


Is c easier than java?

789