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 |
How do you write a program which produces its own source code as its output?
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit
WAP to display 1,2,3,4,5........N
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
Program to find the largest sum of contiguous integers in the array. O(n)
main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4
18 Answers HCL, IBM, Infosys, LG Soft, Satyam,
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
Write a C program to add two numbers before the main function is called.
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,