{"id":9624,"date":"2022-05-14T04:55:59","date_gmt":"2022-05-14T04:55:59","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=9624"},"modified":"2024-10-08T15:47:16","modified_gmt":"2024-10-08T10:17:16","slug":"address-of-variables","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/","title":{"rendered":"Microcontroller Embedded C Programming Lecture 35| Address of variables"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 35px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<div class=\"boldgrid-shortcode\" data-imhwpb-draggable=\"true\">\n\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 30px; border-width: 0px; line-height: 50px;\"><span style=\"color: #000080;\"><strong>Address of variables<\/strong><\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\" style=\"border-width: 0px; margin-top: -25px;\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<p>&nbsp;<\/p>\n<div class=\"bg-hr bg-hr-10 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In this article, let&#8217;s learn about the address of variables. <\/span><\/p>\n<figure id=\"attachment_9627\" aria-describedby=\"caption-attachment-9627\" style=\"width: 503px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-9627 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/05\/Figure-1-10-1024x379.png\" alt=\"Figure 1. Address of variables\" width=\"503\" height=\"186\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-1024x379.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-300x111.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-768x285.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-600x222.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-1536x569.png 1536w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-120x44.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-500x185.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-200x74.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-400x148.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-800x296.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10-1200x445.png 1200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-1-10.png 1795w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><figcaption id=\"caption-attachment-9627\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Address of variables<\/span><\/figcaption><\/figure>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Consider the variable named <code>myData<\/code>.<\/span><\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">When you use the notation <code>&amp;myData<\/code>, it <span style=\"font-weight: 400;\">gives you the memory location address of <code>myData<\/code> or the memory location address of the variable<\/span> . To extract this address, <span style=\"font-weight: 400;\">you have to use the ampersand(&amp;) sign in front of the variable name<\/span>. This provides the memory location address of the variable.<\/span><\/p>\n<p class=\"\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #ff0000;\"><strong>Exercise:<\/strong><\/span><\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400; padding-left: 40px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b> Write a program to print the address of variables.<\/b><\/span><\/p>\n<blockquote style=\"position: absolute; left: -15615px;\"><p>https:\/\/www.traditionrolex.com\/25<\/p><\/blockquote>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px; padding-left: 40px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Now, let&#8217;s print the addresses of all the below variables.&nbsp;<\/span><\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\"><span style=\"color: #ff99cc;\">#include<\/span>&lt;stdio.h&gt;\r\n\r\n<span style=\"color: #ff99cc;\">int<\/span> main()\r\n{\r\n&nbsp; &nbsp; <span style=\"color: #ff99cc;\">char<\/span> a1 = 'A';\r\n&nbsp; &nbsp; <span style=\"color: #ff99cc;\">char<\/span> a2 = 'p';\r\n  <span style=\"color: #ff99cc;\">  char<\/span> a3 = 'p';\r\n    <span style=\"color: #ff99cc;\">char<\/span> a4 = 'l';\r\n    <span style=\"color: #ff99cc;\">char<\/span> a5 = 'e';\r\n  <span style=\"color: #ff99cc;\">  char<\/span> a6 = ':';\r\n    <span style=\"color: #ff99cc;\">char<\/span> a7 = ')';\r\n    <span style=\"color: #ff99cc;\">return<\/span> 0;\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">Exercise<\/p>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">To print the address of a variable, there is one unique format specifier, that is &nbsp;<code>%p<\/code><\/span><span style=\"font-weight: 400;\">. This specifier allows the printing of memory location addresses.<\/span><span style=\"font-weight: 400;\">.<\/span><\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\"><span style=\"color: #ff99cc;\">#include<\/span>&lt;stdio.h&gt; \r\n\r\n<span style=\"color: #ff99cc;\">int<\/span> main() \r\n{ &nbsp;  \r\n    <span style=\"color: #ff99cc;\">char<\/span> a1 = 'A'; &nbsp; &nbsp;\r\n<span style=\"color: #ff99cc;\">    char<\/span> a2 = 'p';\r\n<span style=\"color: #ff99cc;\">    char<\/span> a3 = 'p';\r\n<span style=\"color: #ff99cc;\">    char<\/span> a4 = 'l';\r\n    <span style=\"color: #ff99cc;\">char<\/span> a5 = 'e'; \r\n<span style=\"color: #ff99cc;\">    char<\/span> a6 = ':'; \r\n<span style=\"color: #ff99cc;\">    char<\/span> a7 = ')'; \r\n    <span style=\"color: #ff00ff;\">printf<\/span>(\"Address of variable a1 = <strong>%p<\/strong>\\n\", &amp;a1);\r\n<span style=\"color: #ff99cc;\">    return<\/span> 0; \r\n}<\/pre>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Use <code>printf<\/code><\/span><span style=\"font-weight: 400;\"> to print the Address of variable <code>a1<\/code>. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">S<\/span><\/span><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">o, the Address of variable a1 is equal to you can use the format specifier <code>%p<\/code><\/span><span style=\"font-weight: 400;\"> here. So, <code>%p<\/code> helps you print the Address of the variable in hexadecimal format. After that, you can give \\n here. And after that, to print the Address, you have to use the argument here <code>&amp;a1<\/code><\/span><span style=\"font-weight: 400;\">. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 18px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #993300;\"><strong><span style=\"text-decoration: underline;\">Output:<\/span><\/strong><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">The output in Figure 2 shows that the address of variable <code>a1<\/code> is <code>0x7fff7be9d2e9<\/code>. So, the value 65, which is the ASCII code for \u2018<\/span><b>A<\/b><span style=\"font-weight: 400;\">,\u2019 is stored at this location( 0x7fff7be9d2e9). <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">So, <code>0x7fff7be9d2e9<\/code> is a memory address.&nbsp;<\/span><\/span><\/p>\n<figure id=\"attachment_9629\" aria-describedby=\"caption-attachment-9629\" style=\"width: 686px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-9629 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/05\/Figure-3-10-1024x723.png\" alt=\"Figure 3. print the address of variable a1\" width=\"686\" height=\"485\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-1024x723.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-300x212.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-768x542.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-600x424.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-120x85.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-500x353.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-200x141.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-400x282.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10-800x565.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-3-10.png 1197w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><figcaption id=\"caption-attachment-9629\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Print the address of variable a1<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">We can conclude from this experiment that there is a memory location of 1 byte, whose address is this one(0x00007FFF8E3C3821) and the address size is 8 bytes because that code is running on a 64-bit machine.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\"> For 64 bit machine, the size of the memory location address is 8 bytes. So, this is a address(0x00007FFF8E3C3821). We also call it a <a href=\"https:\/\/fastbitlab.com\/pointers-in-c\/\" target=\"_blank\" rel=\"noopener\">pointer in &#8216;C&#8217;<\/a> because that points to the data. And the data is stored at that memory location, and the data happens to be<span style=\"color: #ff6600;\"> <a style=\"color: #ff6600;\" href=\"http:\/\/fastbitlab.com\/ascii-code\/\" target=\"_blank\" rel=\"noopener\">ASCII code<\/a><\/span> of &#8216;A,&#8217; which is&nbsp; 0x41.&nbsp;<\/span><\/p>\n<figure id=\"attachment_9630\" aria-describedby=\"caption-attachment-9630\" style=\"width: 644px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-9630 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/05\/Figure-4-8-1024x497.png\" alt=\"Figure 4. Memory location of 1 byte\" width=\"644\" height=\"313\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-1024x497.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-300x146.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-768x373.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-600x291.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-1536x746.png 1536w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-120x58.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-500x243.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-200x97.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-400x194.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-800x388.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8-1200x583.png 1200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png 1899w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><figcaption id=\"caption-attachment-9630\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Memory location of 1 byte<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 19px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #993366;\"><strong>Printing All Variable Addresses<\/strong><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, let&#8217;s print the addresses of all the variables. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s see how it goes. So, you can see in Figure 4 that these are consecutive memory location addresses. That means your data is stored in the consecutive memory location addresses.&nbsp;&nbsp;<\/span><\/p>\n<figure id=\"attachment_9631\" aria-describedby=\"caption-attachment-9631\" style=\"width: 719px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9631 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/05\/Figure-5-7-1024x576.png\" alt=\"Figure 5. print the address of remaining variables\" width=\"719\" height=\"404\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-1024x576.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-300x169.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-768x432.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-600x338.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-120x68.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-500x281.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-200x113.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-400x225.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-800x450.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7-1200x675.png 1200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-5-7.png 1280w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><figcaption id=\"caption-attachment-9631\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. print the address of remaining variables<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, let&#8217;s run the same code on our machine using eclipse software, and let&#8217;s see how it goes.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The code was compiled successfully. Actually there is one warning(Figure 5).<\/span><\/p>\n<blockquote class=\"\">\n<p class=\"\" style=\"border-width: 0px; font-size: 17px;\"><span style=\"font-weight: 400; color: #000000;\"><span style=\"text-decoration: underline; color: #000080;\"><strong>Note:<\/strong><\/span> There is a difference between the Eclipse IDE you use on your PC and this online IDE. The online IDE doesn&#8217;t show you all the warnings. So, that&#8217;s one of the drawbacks of using the online IDE.&nbsp;<\/span><\/p>\n<\/blockquote>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Here the warning says that the<code>a7<\/code> variable is unused.<\/span><\/p>\n<figure id=\"attachment_9632\" aria-describedby=\"caption-attachment-9632\" style=\"width: 643px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9632 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/05\/Figure-6-4-1024x507.png\" alt=\"Figure 6. Test the program in Eclipse IDE\" width=\"643\" height=\"318\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-1024x507.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-300x149.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-768x380.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-600x297.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-120x59.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-500x248.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-200x99.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-400x198.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-800x396.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4-1200x594.png 1200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-6-4.png 1315w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><figcaption id=\"caption-attachment-9632\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Test the program in Eclipse IDE<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let&#8217;s use that, or you can comment it out the <code>a7<\/code> variable. No problem. Let&#8217;s build once again. The build is clean.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">And after that, let&#8217;s run the project. So, here we can see that on our machine, my machine is a 64-bit machine, and it shows these are the addresses of the variables(Figure 6).<\/span><\/p>\n<figure id=\"attachment_9633\" aria-describedby=\"caption-attachment-9633\" style=\"width: 714px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-9633 \" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2022\/05\/Figure-7-3-1024x547.png\" alt=\"Figure 7. Test the program in Eclipse IDE\" width=\"714\" height=\"382\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-1024x547.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-1536x821.png 1536w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3-1200x641.png 1200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-7-3.png 1799w\" sizes=\"(max-width: 714px) 100vw, 714px\" \/><figcaption id=\"caption-attachment-9633\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Test the program in Eclipse IDE<\/span><\/figcaption><\/figure>\n<p data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Address of variables continued in the <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"http:\/\/fastbitlab.com\/microcontroller-embedded-c-programming-lecture-36-address-of-variables-contd\/\" target=\"_blank\" rel=\"noopener\">following article<\/a><\/span>.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 20px; line-height: 25px;\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px;\"><span style=\"color: #000000;\">C<span style=\"font-weight: 400;\">lick here:&nbsp;<\/span><\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<h4 class=\"\">&nbsp;<\/h4>\n<h4 class=\"\"><span style=\"color: #000080;\"><strong>Fastbit Embedded Technologies<\/strong><\/span><\/h4>\n<p class=\"\"><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/fastbitembedded.com\" target=\"_blank\" rel=\"noopener\">https:\/\/fastbitembedded.com<\/a><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Address of variables &nbsp; &nbsp; In this article, let&#8217;s learn about the address of variables. &nbsp; Consider the variable named myData. When you use the notation &amp;myData, it gives you the memory location address of myData or the memory location address of the variable . To extract this address, you have to use the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9630,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[16],"class_list":["post-9624","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-microcontroller-embedded-c-programming","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to print the Memory location address of a variables in C?<\/title>\n<meta name=\"description\" content=\"Use the ampersand(&amp;) sign in front of the variable name to print the address of variables in C. It gives you the memory location address of\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/address-of-variables\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to print the Memory location address of a variables in C?\" \/>\n<meta property=\"og:description\" content=\"Use the ampersand(&amp;) sign in front of the variable name to print the address of variables in C. It gives you the memory location address of\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/address-of-variables\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-14T04:55:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-08T10:17:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1899\" \/>\n\t<meta property=\"og:image:height\" content=\"922\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"Microcontroller Embedded C Programming Lecture 35| Address of variables\",\"datePublished\":\"2022-05-14T04:55:59+00:00\",\"dateModified\":\"2024-10-08T10:17:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/\"},\"wordCount\":630,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Figure-4-8.png\",\"keywords\":[\"Microcontroller Embedded C programming Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/\",\"name\":\"How to print the Memory location address of a variables in C?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Figure-4-8.png\",\"datePublished\":\"2022-05-14T04:55:59+00:00\",\"dateModified\":\"2024-10-08T10:17:16+00:00\",\"description\":\"Use the ampersand(&) sign in front of the variable name to print the address of variables in C. It gives you the memory location address of\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Figure-4-8.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/Figure-4-8.png\",\"width\":1899,\"height\":922,\"caption\":\"Figure 4. Memory location of 1 byte\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/address-of-variables\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Microcontroller Embedded C Programming Lecture 35| Address of variables\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to print the Memory location address of a variables in C?","description":"Use the ampersand(&) sign in front of the variable name to print the address of variables in C. It gives you the memory location address of","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/","og_locale":"en_US","og_type":"article","og_title":"How to print the Memory location address of a variables in C?","og_description":"Use the ampersand(&) sign in front of the variable name to print the address of variables in C. It gives you the memory location address of","og_url":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2022-05-14T04:55:59+00:00","article_modified_time":"2024-10-08T10:17:16+00:00","og_image":[{"width":1899,"height":922,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"Microcontroller Embedded C Programming Lecture 35| Address of variables","datePublished":"2022-05-14T04:55:59+00:00","dateModified":"2024-10-08T10:17:16+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/"},"wordCount":630,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png","keywords":["Microcontroller Embedded C programming Lectures"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/","url":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/","name":"How to print the Memory location address of a variables in C?","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png","datePublished":"2022-05-14T04:55:59+00:00","dateModified":"2024-10-08T10:17:16+00:00","description":"Use the ampersand(&) sign in front of the variable name to print the address of variables in C. It gives you the memory location address of","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/address-of-variables\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2022\/05\/Figure-4-8.png","width":1899,"height":922,"caption":"Figure 4. Memory location of 1 byte"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/address-of-variables\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Microcontroller Embedded C Programming Lecture 35| Address of variables"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/9624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=9624"}],"version-history":[{"count":7,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/9624\/revisions"}],"predecessor-version":[{"id":16980,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/9624\/revisions\/16980"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/9630"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=9624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=9624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=9624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}