Question: Please show the outcome of the program, and please explain the answer as easy as possible please and thank you - - - - -
Please show the outcome of the program, and please explain the answer as easy as possible please and thank you First try to predict the outcome of the following C program. Then, run it to find out whether your prediction was correct or not. Try to justify your observation using the
concept of pointers in
Hint: Please note that:
p is a pointer initialized to letter o in the string "hello world!"
str which is the name of char array containing the "hello world!" string is considered to be the pointer to the first letter h
expression str subtracts a pointer from the other resulting in an integer counting how many characters can be fit between these two pointers.
is a character stored two letters before the current position that pointer refers to
p moves the pointer backward in the string "hello world!"
moves the pointer forward in the string "hello world!
#include&;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
