C Programming - Typedef - Discussion
Discussion Forum : Typedef - Yes / No Questions (Q.No. 1)
1.
Is the following declaration acceptable?
typedef long no, *ptrtono;
no n;
ptrtono p;
Discussion:
14 comments Page 1 of 2.
Ashok said:
4 years ago
If anyone knows what is the typedef? Please anyone explain me.
(1)
Irfan khan said:
1 decade ago
Can anybody explain about this concept ?
Nagarjun said:
1 decade ago
In the program declaring the 2 data types.
i.e : no, *ptrono;
Then we declaring the variables for them.
i.e : no, *ptrono;
Then we declaring the variables for them.
Prakash said:
1 decade ago
Please explain anybody.
Indrajit said:
1 decade ago
How is it possible?
Rohit said:
1 decade ago
We are giving two different names to long i.e no and *prtono.
Either of these can be used to declare long variable.
Either of these can be used to declare long variable.
@brij said:
1 decade ago
Declaration of typedef as declaration integer i.e.
int a,*b;
Similarly typedef can also be declare typedef no,*prtono
Here two variable declared i.e no which only data type and prtono that is pointer type variable.
int a,*b;
Similarly typedef can also be declare typedef no,*prtono
Here two variable declared i.e no which only data type and prtono that is pointer type variable.
Sanju said:
1 decade ago
We are using no as long ptrtono as long pointer like long *.
So no as long and prttono as long *.
So no as long and prttono as long *.
Venkatesh said:
1 decade ago
I am not sure of this but typedef long *ptr; <=> typedef(long*)ptr; here we are declaring ptr as as a long pointer.
Now typedef long no. is using no to replace long.
Now typedef long no. is using no to replace long.
Aksshat said:
10 years ago
Can any one explain?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers