انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية العلوم للبنات
القسم قسم الحاسبات
المرحلة 2
أستاذ المادة اسراء عبد الله حسين علي الدليمي
28/05/2018 18:58:44
Introduction to Pointers Some C programming tasks are performed more easily with pointers and other tasks such as dynamic memory allocation cannot be performed without using pointers. So it becomes necessary to learn pointers to become a perfect C programmer. A Pointer in C language is a variable which holds the address of another variable of same data type. Pointers are used to access memory and manipulate the address. Before we start understanding what pointers are and what they can do, let s start by understanding what does "Address of a memory location" means. Address in C Whenever a variable is defined in C language a memory location is assigned for it in which its value will be stored. We can easily check this memory address using the & symbol. If var is the name of the variable, then &var will give it s address. Let s write a small program to see memory address of any variable that we define in our program. Concept of Pointers Whenever a variable is declared in a program system allocates a location i.e an address to that variable in the memory to hold the assigned value. This location has its own address number which we just saw above. Let us assume that system has allocated memory location 80F for a variable a.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|