Program 102 #P102 -C Program Example How Pointer Works #C228

Subscribers:
10,700
Published on ● Video Link: https://www.youtube.com/watch?v=rAJISKxuGcE



Duration: 1:53
88 views
10


Explanation of the program

int* pc, c;
A pointer variable and a normal variable is created.
Here, a pointer pc and a normal variable c, both of type int, is created.
Since pc and c are not initialized at first, pointer pc points to either no address or a random address. And, variable c has an address but contains a random garbage value.

c = 22;
22 is assigned to variable c.
This assigns 22 to the variable c, i.e., 22 is stored in the memory location of variable c.
Note that, when printing &c (address of c), we use %u rather than %d since address is usually expressed as an unsigned integer (always positive).

pc = &c;
Address of variable c is assigned to pointer pc.
This assigns the address of variable c to the pointer pc.
You see the value of pc is same as the address of c and the content of pc is 22 as well.

c = 11;
11 is assigned to variable c.
This assigns 11 to variable c.
Since, pointer pc points to the same address as c, value pointed by pointer pc is 11 as well.

*pc = 2;
5 is assigned to pointer variable's address.
This change the value at the memory location pointed by pointer pc to 2.
Since the address of the pointer pc is same as the address of c, value of c is also changed to 2.

|| Like-Comment-Subscribe-Share ||
||Support and Subscribe ||
#rubalsolutions #coding #developer #programming #programmer #technology #clanguage #computerscience #c #informaticpractices #sub #subscribe #youtube #newyoutuber #youtubechannel

To Install Turbo C++ 4.5 Click on Below Link and Download rar file and extract and then install..
address updated by app.box.com on 8 april
https://app.box.com/s/soz2137zo0rv0sb08pf4upzgj01umfjr

Do Like,Comment,Share and Subscribe if u are learning little bit.
Please give me suggestions in form of comment box .

Link To My Blog - https://www.blogger.com/blogger.g?blo...
Like me on Facebook @ https://www.facebook.com/rubalsolutions/
Follow me on Twitter @ https://twitter.com/ruby0071
Follow me on Instagram @https://www.instagram.com/er.rubal/
Email me at :- ruby0071@gmail.com

Recording Microphone Mic & Tripod Stand for Laptop
https://amzn.to/2WCV5a8
Mini Professional Handheld Microphone Compatible with Xiaomi, Lenovo, Apple, Samsung, Sony, Oppo, Gionee, Vivo Smartphones (One Year Warranty)
https://amzn.to/2HRp1fj




Other Videos By Rubal Solutions


2019-04-30Program 111 #P111 -Example 3: passing string to function c strings functions|| Simple String #C237
2019-04-30Program 110 #P110 -Example 2: gets() and puts() c strings input output functions|| String #C236
2019-04-29Program 109 #P109 -Example 1: scanf() to read a string || Simple String #C235
2019-04-29Theory - C Programming Strings || Learning C Programming || string is an array of characters #C234
2019-04-26Program 108 #P108 -Find Largest Element Using Dynamic Memory Allocation - calloc() #C233
2019-04-26Program 107 #P107 -C Program for MALLOC and REALLOC FUNCTION Dynamic Memory Allocation #C232
2019-04-25Program 106 #P106 -C Program for CALLOC and FREE FUNCTION to calculates the sum of n numbers #C231
2019-04-24Program 105 #P105 -C Program for MALLOC and FREE FUNCTION to calculates the sum of n numbers #C230
2019-04-24Program 104 #P104 -C Program to Swap Elements Using Call by Reference #C229
2019-04-23Program 103 #P103 -C Program Example Pointers and Arrays .. Simple Pointer Array Example #C228
2019-04-22Program 102 #P102 -C Program Example How Pointer Works #C228
2019-04-22Some Useful Tips For Women Travelling In Train - Hope This Will Helps. Security Tips On Travelling.
2019-04-22Program 101 #P101-C Program to Access Array Elements Using Pointers #C227
2019-04-21Theory - Call By Reference ||Dynamic Allocation||C Lecture Pointer’s || Learning C Programming #C226
2019-04-19Theory - Pointers are powerful features of C C++ || Learning C Programming ||For Beginners||#C225
2019-04-18Class 6th : Chapter 4- Tables and Charts in Impress || CBSE || computer science || Course Book ||
2019-04-18Class 6th : Chapter 3- Learn Mail Merge || CBSE || computer science || Course Book ||
2019-04-17महावीर स्वामी का जीवन परिचय, 2019 जयंती | Mahavir Swami 2019 Jayanti and history in hindi
2019-04-16Theory Lecture - C – Pointers Arithmetic PART 2 || Learning C Programming || For Beginners || #C224
2019-04-15Theory Lecture - C – Pointers BASIC PART 1 || Learning C Programming || For Beginners || #C223
2019-04-14Program 100 #P100-C Program for Selection sorting-Implementing selection sort algorithm #C222



Tags:
computer education
computer education in Hindi
basic computer training
rubalsolutions
beginner YouTube
coding'
developer
newyoutuber
subscribe
sub
computer-science
cprogramming
youtuberocks
subscribeandsupport
coding interview
pointers
pointers in c
c pointers