void main()

{

int const * p=5;

printf("%d",++(*p));

}

Answers were Sorted based on User's Feedback



void main() { int const * p=5; printf("%d",++(*p)); }..

Answer / susie

Answer :

Compiler error: Cannot modify a constant value.

Explanation:

p is a pointer to a "constant integer". But we
tried to change the value of the "constant integer".

Is This Answer Correct ?    78 Yes 10 No

void main() { int const * p=5; printf("%d",++(*p)); }..

Answer / mahe

5
pointer value does not change.so print thier value

Is This Answer Correct ?    3 Yes 8 No

void main() { int const * p=5; printf("%d",++(*p)); }..

Answer / jambalakadi pamba

here...p is a pointer which is pointing to a addresss which is constant....!!! so the output is 6

Is This Answer Correct ?    8 Yes 22 No

Post New Answer

More C Code Interview Questions

main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }

1 Answers  


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

0 Answers  


#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }

1 Answers  


Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


I need your help, i need a Turbo C code for this problem.. hope u'll help me guys.? Your program will have a 3x3 array. The user will input the sum of each row and each column. Then the user will input 3 values and store them anywhere, or any location or index, temporarily in the array. Your program will supply the remaining six (6) values and determine the exact location of each value in the array. Example: Input: Sum of row 1: 6 Sum of row 2: 15 Sum of row 3: 24 Sum of column 1: 12 Sum of column 2: 15 Sum of column 3: 18 Value 1: 3 Value 2: 5 Value 3: 6 Output: Sum of Row 1 2 3 6 4 5 6 15 7 8 9 24 Sum of Column 12 15 18 Note: Your program will not necessary sort the walues in the array Thanks..

0 Answers  






Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

0 Answers   IBM,


main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000

3 Answers   HCL,


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,


void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }

2 Answers  


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


how to return a multiple value from a function?

5 Answers   Wipro,


What is data _null_? ,Explain with code when u need to use it in data step programming ?

0 Answers   Abbott,


Categories