main()
{
int a=10,*j;
void *k;
j=k=&a;
j++;
k++;
printf("\n %u %u ",j,k);
}
Answer / susie
Answer :
Compiler error: Cannot increment a void pointer
Explanation:
Void pointers are generic pointers and they can be used only
when the type is not known and as an intermediate address
storage type. No pointer arithmetic can be done on it and
you cannot apply indirection operator (*) on void pointers.
Is This Answer Correct ? | 22 Yes | 2 No |
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
could you please send the program code for multiplying sparse matrix in c????
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
why array index always strats wuth zero?
Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().