{"id":110,"date":"2014-05-04T04:39:00","date_gmt":"2014-05-04T03:39:00","guid":{"rendered":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/04\/what-is-the-difference-between-reference-and-pointer\/"},"modified":"2014-05-04T04:39:00","modified_gmt":"2014-05-04T03:39:00","slug":"what-is-the-difference-between-reference-and-pointer","status":"publish","type":"post","link":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/04\/what-is-the-difference-between-reference-and-pointer\/","title":{"rendered":"What is the difference between reference and pointer?"},"content":{"rendered":"<div class='booster-block booster-read-block'>\n                <div class=\"twp-read-time\">\n                \t<i class=\"booster-icon twp-clock\"><\/i> <span>Read Time:<\/span>20 Second                <\/div>\n\n            <\/div><div dir=\"ltr\" style=\"text-align: left;\">\n<span style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\">A pointer can have Null value ,int *p=Null means, it is not having any address to point . while reference can&#8217;t have &amp;p=Null(not allowed).<\/span><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><span style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\">2- address can be changed in case of pointer while in case of reference it can&#8217;t b.&nbsp;<\/span><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><span style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\">int a=10;<\/span><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><span style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\">int *p =&amp;a,<\/span><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><span style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\">int b=30;<\/span><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><br style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\" \/><span style=\"background-color: white; font-family: Verdana, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 17px;\">int *p=&amp;b; valid now, but in reference it&#8217;s not possible.<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A pointer can have Null value ,int *p=Null means, it is not having any address to point . while reference can&#8217;t have &amp;p=Null(not allowed).2- address can be changed in case of pointer while in case of reference it can&#8217;t b.&nbsp;int a=10;int *p =&amp;a,int b=30;int *p=&amp;b; valid now, but in reference it&#8217;s not possible.<\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[24],"tags":[],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-c-net"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Himanshu Namdeo","author_link":"https:\/\/debuggersspace.com\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"A pointer can have Null value ,int *p=Null means, it is not having any address to point . while reference can&#8217;t have &amp;p=Null(not allowed).2- address can be changed in case of pointer while in case of reference it can&#8217;t b.&nbsp;int a=10;int *p =&amp;a,int b=30;int *p=&amp;b; valid now, but in reference it&#8217;s not possible.","_links":{"self":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/110"}],"collection":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":0,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/categories?post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/tags?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}