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 are segment and offset addresses?
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
write a c-program to display the time using FOR loop
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
How we will connect multiple client ? (without using fork,thread)
write a program to count the number the same (letter/character foreg: 's') in a given sentence.
What is the main difference between STRUCTURE and UNION?
x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);
Print an integer using only putchar. Try doing it without using extra storage.
Write a routine that prints out a 2-D array in spiral order
main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }