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

Write a program to print factorial of given number without using recursion?

783


Can we declare function inside main?

764


When is a null pointer used?

843


How does sizeof know array size?

847


What is 1d array in c?

848


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

831


What is the difference between constant pointer and constant variable?

972


Explain what will the preprocessor do for a program?

805


How can you read a directory in a C program?

894


How is = symbol different from == symbol in c programming?

816


Is c++ based on c?

845


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1720


What is the use of header files?

831


If errno contains a nonzero number, is there an error?

1054


In a switch statement, what will happen if a break statement is omitted?

832