int *ptr, p; ptr is a pointer to integer, p is notptr and p, both are pointers to integerptr is a pointer to integer, p may or may not beptr and p both are not pointers to integer
Question
int *ptr, p; ptr is a pointer to integer, p is notptr and p, both are pointers to integerptr is a pointer to integer, p may or may not beptr and p both are not pointers to integer
Solution
The statement "int *ptr, p;" in C or C++ declares that "ptr" is a pointer to an integer, while "p" is just an integer. So, the correct interpretation is "ptr is a pointer to integer, p is not".
Similar Questions
Comment on the following pointer declaration.int *ptr, p;
What is the correct syntax to declare a pointer in C++?int &ptr;int ptr*;int *ptr;int ptr&;
ct the correct answerWhich of the following is the correct way to declare a pointer to an integer in C?Optionsinteger *ptr;ptr *int;int *ptr;point int *ptr;
In C, what is the result of declaring a pointer as int *ptr; without initialization?Marks : 1Negative Marks : 0Answer hereThe value of the variableptr points to a specific known memory locationptr contains a garbage value as its addressptr points to the memory location 0
In C, what is the result of declaring a pointer as int *ptr; without initialization?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.