What is a pointer variable in c language?



What is a pointer variable in c language?..

Answer / Avi Mantala

A pointer is a variable that stores the memory address of another variable. In C, you can declare a pointer by placing an asterisk (*) before the variable name.nnFor example:nn```cnint num = 42;nint *ptr = #nprintf("The value of num is: %d
", num);nprintf("The address of num is: %p
", &num);nprintf("The value stored in the pointer ptr is: %p
", ptr);nprintf("The value that the pointer ptr points to is: %d
", *ptr);n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

1 Answers  


Mention four important string handling functions in c languages .

1 Answers  


What is pointers in c?

1 Answers  


What are static variables, and where are they stored?

2 Answers  


How can you invoke another program from within a C program?

1 Answers  


Why malloc is faster than calloc?

1 Answers  


What is meant by type specifiers?

1 Answers  


What is storage class?

1 Answers  


Explain what is a static function?

1 Answers  


write a programme to enter some number and find which number is maximum and which number is minimum from enterd numbers.

3 Answers  


Explain Basic concepts of C language?

1 Answers   EXL,


What is extern keyword in c?

1 Answers  


Categories