char* ptr = "Rahul";
*ptr++;
printf("%s",ptr);
What will be the output
Answer Posted / 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 |
Post New Answer View All Answers
How to call a non virtual function in the derived class by using base class pointer
What is oops?what is its use in software engineering?
What does and I oop mean?
write knight tour problem which is present in datastructure
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
Why is oop useful?
Can a varargs method be overloaded?
What is abstraction in oop?
What is class and object with example?
Which method cannot be overridden?
Is html an oop?
How many human genes are polymorphic?
What is class encapsulation?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What is polymorphism programming?