Pointer In C Programming Language
In this post, We will learn about pointer in C programming language.
Example
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
In this post, We will learn about pointer in C programming language.
Introduction
Pointers in C programming language is a variable that stores the memory address of another variable. A pointer in C is used to allocate memory dynamically i.e. at runtime. The pointer variable might be belonging to any of the data types such as int, float, char, double, short etc.Important Points About Pointer in C:
- Pointer stores the address of a variable whereas a normal variable stores the value.
- The content of the C pointer always be a whole number i.e. address.
- Default C pointer is initialized to null, i.e. int *p = null.
- The value of the null pointer is 0.
- & symbol is used to get the address of the variable.
- * symbol is used to get the value of the variable that the pointer is pointing to.
- If a pointer in C is assigned to NULL, it means it is pointing to nothing.
- Two pointers can be subtracted to know how many elements are available between these two pointers.
- But, Pointer addition, multiplication, division are not allowed.
- The size of any pointer is 2 byte (for a 16-bit compiler).
#include <stdio.h>
int main()
{
int *ptr, var;
var = 50;
/* address of var is assigned to ptr */
ptr = &var;
/* display var's value using ptr variable */
printf("%d", *ptr);
return 0;
}
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
You shares a lot of useful information about technology. Thank you for sharing this with us and keep sharing more like this.
ReplyDeleteC++ Training in Chennai
C C++ Training in Chennai
core java training in chennai
javascript training institute in chennai
javascript training in chennai
core java training in chennai
core java training
php mysql course in chennai
ReplyDeleteJava Training in Chennai
ReplyDeleteThanks for the interesting blog that you have implemented here. Very helpful and innovative. Waiting for your next upcoming article.
ReplyDeleteJava Training in Chennai
Java Training Institute in Chennai
Java course in chennai
Java Training classes
Java Training
Java programming classes
core Java course
7 tips to start a career in digital marketing
ReplyDelete“Digital marketing is the marketing of product or service using digital technologies, mainly on the Internet, but also including mobile phones, display advertising, and any other digital medium”. This is the definition that you would get when you search for the term “Digital marketing” in google. Let’s give out a simpler explanation by saying, “the form of marketing, using the internet and technologies like phones, computer etc”
we have offered to the advanced syllabus course digital marketing for available join now
more details click the link now
[url]https://www.webdschool.com/digital-marketing-course-in-chennai.html [/url]
Web designing trends in 2020
ReplyDeleteWhen we look into the trends, everything which is ruling today’s world was once a start up and slowly begun getting into. But Now they have literally transformed our lives on a tremendous note. To name a few, Facebook, WhatsApp, Twitter can be a promising proof for such a transformation and have a true impact on the digital world.
we have offered to the advanced syllabus course web design and development for available join now
more details click the link now
[url]https://www.webdschool.com/web-development-course-in-chennai.html[/url]
I have a mission that I’m just now working on, and I have been at the lookout for such information.
ReplyDeletePlease check ExcelR Data Science Courses nicepage
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai