Pointer is not at all a difficult concept. Pointer usage has created much difficulty for code maintenance and in debugging and hence the word spread “Pointers are difficult”. But for a programmer writing codes in the order of 100s of lines, pointers shouldn’t be difficult.
In C language a pointer is just a normal data type that can hold an address
There is just two operators a programmer should know about pointer usage
&var => returns the address of var *var => returns the content of value of var (it takes the value of var as address and returns the value of that address)
Just to ensure no confusion is there
var => returns the value of var
A pointer can hold any address (any int value can be considered an address), but the programmer should ensure that the address is within the memory range allocated to the process, or otherwise a segmentation fault can occur. Two normal ways of doing this is
This page shows all details regarding GATE CSE 2022 Admissions including results, admission offers and…
Source Add your Response Rank Predictor for GATE CSE 2021 Result Responses: GATE CSE 2021…
Best Books for GATE CSE with Relevant Chapters to Read Heads Up! These GATE CSE…
Indian Statistical Institute(ISI) offers M Tech in Computer Science with the Admission Test Codes MMA/PCA…
Indian Statistical Institute(ISI) offers Junior Research Fellowships (JRF) in Computer Science, Statistics, Mathematics, Quantitative Economics,…
Indian Statistical Institute(ISI) conduct the admission test for Postgraduate Diploma in Computer Applications(PGDCA) with the…