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
Write a code of a general series where the next element is the sum of last k terms.
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is s or c?
how many key words availabel in c a) 28 b) 31 c) 32
Can a local variable be volatile in c?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
Explain output of printf("Hello World"-'A'+'B'); ?
Can we increase size of array in c?
How can I find out the size of a file, prior to reading it in?
Why does notstrcat(string, "!");Work?
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
How can I read data from data files with particular formats?
plz let me know how to become a telecom protocol tester. thank you.