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 |
features of OOPS
22 Answers Ness Technologies, Satyam,
what is Class in oops with example?
What is property in oops?
what is the main difference between sizeof() operator in c and c++
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.
write a programe to calculate the simple intrest and compund intrest using by function overlading
Why do we use inheritance?
How would you stop a class from class from being derived or inherited.
What does <> mean pseudocode?
WILL I GET A guaranteed JOB AFTER DOING bsc()IT) and GNIIT from an NIIT CENTRE??
21 Answers Biocon, MIT, NIIT,
What is data binding in oops?