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 2 of 2.
Suraj Mundalik said:
8 years ago
It will be like this;
long n;
long *p;
long n;
long *p;
Yash said:
8 years ago
Yes, right @Sanju.
Siddhartha soam said:
5 years ago
Here, ptrtono is declared as a pointer
but in third line(ptrtono p;) is wrong because, we have to use & operator to store a pointer value.
So the correct form is(ptrtono &p;).
Correct me if I am wrong.
but in third line(ptrtono p;) is wrong because, we have to use & operator to store a pointer value.
So the correct form is(ptrtono &p;).
Correct me if I am wrong.
Ashok said:
4 years ago
If anyone knows what is the typedef? Please anyone explain me.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers