Made easy theory, Self doubt in pointers
in Programming edited by
148 views
0 votes
0 votes

#include<stdio.h>
int main() {
 char *p1="Graduate";
 char *p2=p1;
 printf("%c",*++p2);
 printf("%d",sizeof(p2));
  return 0;
}

 

in Programming edited by
by
11 points
148 views

6 Comments

Can you tell me your doubt?
0
0

Ans will be d) https://ideone.com/cY6X0a

@Kushagra is GATE exam registration started? 

0
0
YES. I have not received the OTP yet :|
0
0
Bro How the value 8 is decided? This is my doubt.
0
0
It is the size of a pointer. It is  fixed in an architecture.
0
0
yes, pointer is of 4B or 8B depend on machine.
0
0

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.