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 |
In a byte, what is the maximum decimal number that you can accommodate?
Explain the concept and use of type void.
convert 0.9375 to binary
being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?
Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which of the following is incorrect? (A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .
When can a far pointer be used?
Write a factorial program using C.
struct tag{ auto int x; static int y; };main() { struct tag s; s.x=4; s.y=5; printf(ā%dā,s.x); }
what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason
Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table
Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); }
What is the use of getchar functions?