C Programming - Pointers - Discussion
Discussion Forum : Pointers - Yes / No Questions (Q.No. 5)
5.
Will the following program give any warning on compilation in TurboC (under DOS)?
#include<stdio.h>
int main()
{
int *p1, i=25;
void *p2;
p1=&i;
p2=&i;
p1=p2;
p2=p1;
return 0;
}
Discussion:
21 comments Page 3 of 3.
Sonal said:
1 decade ago
No @badusa, its not like that, void means anything; it can store any data of any type.
Compiler can only follow the instruction & there is no warning.
Compiler can only follow the instruction & there is no warning.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers