what would be the output of the following program?
main()
{
int k = 123;
char *ptr;
ptr = &k;
printf("%d",*ptr);
}
Answer Posted / srsabariselvan
The program results in compilation error.
NOTE: a pointer can stores the address of same data type.
it can't store the address of another data type.
i.e.,
character pointer can stores the address of character data.
it can't store the address of integer data.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Explain how many levels deep can include files be nested?
what type of questions arrive in interview over c programming?
Is a house a shell structure?
What is the difference between typedef and #define?
Is there anything like an ifdef for typedefs?
What is a lvalue
Is r written in c?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What are the uses of a pointer?
Is c++ based on c?
What is a const pointer?
What is local and global variable in c?
What is pass by value in c?
I need testPalindrome and removeSpace
#include
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?