what would be the output of the following program?
main()
{
int k = 123;
char *ptr;
ptr = &k;
printf("%d",*ptr);
}

Answer Posted / ankush

i also have a compilation error.....
""Cannot convert 'int_ss*' to 'char*' in function main()""
why its so....???
i want some answer.....
is my compiler wrong....

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of void in c?

619


What does it mean when the linker says that _end is undefined?

634


Differentiate between new and malloc(), delete and free() ?

675


Why void main is used in c?

559


Where are some collections of useful code fragments and examples?

716






What is function and its example?

626


What happens if header file is included twice?

653


What are the similarities between c and c++?

600


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

702


What are enums in c?

661


What is the purpose of & in scanf?

598


Is main is a keyword in c?

610


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

2578


What is #line in c?

563


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

662