main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?
Answer Posted / sumeet
Samco Systems
amco Systems
this will be the answer .. the reason being the ascii value
of r will be incremented so it now point to s( capital s
that is ) this account for (*ptr)++
next ptr++ will simply move you to the next charachter ..
| Is This Answer Correct ? | 20 Yes | 7 No |
Post New Answer View All Answers
What is the use of getchar() function?
What is a structural principle?
What are the types of c language?
Why c is called a mid level programming language?
Did c have any year 2000 problems?
The __________ attribute is used to announce variables based on definitions of columns in a table?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What is the meaning of 2d in c?
Why doesnt long int work?
What is the difference between local variable and global variable in c?
Place the #include statement must be written in the program?
Why isn't it being handled properly?
When we use void main and int main?
How can I change their mode to binary?