char* ptr = "Rahul";
*ptr++;
printf("%s",ptr);
What will be the output
Answers were Sorted based on User's Feedback
Answer / vadivelt
Since address pointed by ptr got incremented, ptr will point to
address of char 'a'.
So o/p will be - ahul
| Is This Answer Correct ? | 73 Yes | 5 No |
Answer / amit
Ans: ahul
Reason:
Initially character pointer ptr pointed to the first character
of Rahul..when we increase it by increament operator it increase one byte.because size of character is one bye..
now it point to a..
we print from here
therefore we got above answer
so
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / sayali
this code generates the output as,
ahul
but is also generate warning
that
code has no effect..
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / deepak
Ans:Sahul
Reason:
Intially *ptr contains ASCII value of 'R' on incrementing it
will points to ASCII value of 'S'.
| Is This Answer Correct ? | 2 Yes | 15 No |
What is the difference between procedural programming and oops?
Write 7 differences between "Public" function and "Private" function?
advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
Why do we use oop?
How to create a comment page in C #??
design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }
Why is object oriented programming so hard?
whats the difference between c and c++
What is persistence in oop?
how do you handle yourself when you feel the wald is aganist you
Why is it so that we can have virtual constructors but we cannot have virtual destructors?