UGC NET CS 2010 June-Paper-2
October 24, 2023
GATE 2019
October 24, 2023
UGC NET CS 2010 June-Paper-2
October 24, 2023
GATE 2019
October 24, 2023

UGC NET CS 2010 June-Paper-2

Question 12
What will be the output of the following c-code ?
void main ( )
{
char *P = “ayqm” ;
char c;
c = ++*p ;
printf (“%c”, c);
}
A
a
B
c
C
b
D
q
Question 12 Explanation: 
Pointer “p” will point to the string “ayqm”,
*p means the first character of the string which is “a”
++*p means an increment of “a” which is nothing but “b”
printf (“%c”, c); means the character “b” will be printed as output.
Note: They given syntax error in program.
Correct Answer: C
Question 12 Explanation: 
Pointer “p” will point to the string “ayqm”,
*p means the first character of the string which is “a”
++*p means an increment of “a” which is nothing but “b”
printf (“%c”, c); means the character “b” will be printed as output.
Note: They given syntax error in program.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!