void main()
{
int *ptr;
ptr = (int *) 0x400 ;
printf("ptr=%d",ptr);
}
output?
Answer / koti
Ans is 1024.
Why because here ptr is pointing to integer address 0x400.this is hexadecimal address but you are printing decimal value.
The hexadecimal value is
........0000 0100 0000 0000
2 power10 =1024.
| Is This Answer Correct ? | 1 Yes | 0 No |
What will be the outcome of the following conditional statement if the value of variable s is 10?
24.what is a void pointer? 25.why arithmetic operation can’t be performed on a void pointer? 26.differentiate between const char *a; char *const a; and char const *a; 27.compare array with pointer? 28.what is a NULL pointer? 29.what does ‘segmentation violation’ mean? 30.what does ‘Bus Error’ mean? 31.Define function pointers? 32.How do you initialize function pointers? Give an example? 33.where can function pointers be used?
What is a constant?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Explain what’s a signal? Explain what do I use signals for?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5
What is the difference between typedef and #define?
Why doesnt this code work?
What is the difference between void main and main in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
0 Answers Aspire, Infogain, TISL,
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?