#include<stdio.h>
int main(){
int i=10;
int *ptr=&i;
*ptr=(int *)20;
printf("%d",i);
return 0;
}

Output: 20
can anyone explain how came the output is 20


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

What is structure and union in c?

0 Answers  


write a c code "if you give a any decimal number then print that number in english alphabet"? ex: i/p: 552 o/p: five hundred fifty two ...

1 Answers   Philips,


Can you think of a logic behind the game minesweeper.

0 Answers  


What is omp_num_threads?

0 Answers  


What is malloc calloc and realloc in c?

0 Answers  


who developed c and why he developed c?

5 Answers  


How can you restore a redirected standard stream?

0 Answers  


What is a Genralised LInked List?? Please give a detailed explation of it..

1 Answers  


What is the use of #include in c?

0 Answers  


Differentiate fundamental data types and derived data types in C.

0 Answers   HCL,


What is a lvalue

0 Answers   Global Logic,


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

0 Answers  


Categories