what is void pointer?
Answer / himaja
pointers can also be declared as void type.void pointers cant be dereferenced without explict type conversion,this is becoz being void the compiler cnt determine the size of object that pointer points to,though void vaariables declared is not allowed,thus void p displays error msg "size of p is unknown or 0" after compilation
#include<stdio.h>
int p;
float d;
char c;
void *pt=&p;
void main(void)
{
clrscr();
*(int*)pt=12;
printf("\n p=%d",p);
pt=&d; /*pt points to d*/
*(float*)pt=5.4;
printf("\n r=%f",d);
pt=&c; /*pt points to c*/
*(char*)pt=H;
printf("\n c=%c",c);
o/p:
P=12
R=5.4
C=H
| Is This Answer Correct ? | 6 Yes | 0 No |
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
which type of aspect you want from the student.
#include <stdio.h> int main() { if ("X" <"x") printf("X smaller than x "); } my question is whats the mistake in this program? find it and please tell me..
can we implement multi-threads in c.
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
What are the keywords in c?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
what is difference between overriding and overloading?
How can I find the modification date of a file?
what is different between auto and local static? why should we use local static?
Why is C language being considered a middle level language?
code for selection sort?