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 |
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
can u give me the c codings for converting a string into the hexa decimal form......
void main() { int const * p=5; printf("%d",++(*p)); }
3 Answers Infosys, Made Easy, State Bank Of India SBI,
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }