void main()
{
void *v;
int integer=2;
int *i=&integer;
v=i;
printf("%d",(int*)*v);
}
Answer / susie
Answer :
Compiler Error. We cannot apply indirection on type void*.
Explanation:
Void pointer is a generic pointer type. No pointer
arithmetic can be done on it. Void pointers are normally
used for,
1. Passing generic pointers to functions and returning such
pointers.
2. As a intermediate pointer type.
3. Used when the exact pointer type will be known at a later
point of time.
| Is This Answer Correct ? | 11 Yes | 1 No |
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
Implement a t9 mobile dictionary. (Give code with explanation )
1 Answers Amazon, Peak6, Yahoo,
how to return a multiple value from a function?
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(ā%dā,k); }
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }