{"id":5041,"date":"2022-08-18T07:05:00","date_gmt":"2022-08-18T04:05:00","guid":{"rendered":"http:\/\/professor.norton.net.br\/?p=5041"},"modified":"2022-08-18T20:19:21","modified_gmt":"2022-08-18T17:19:21","slug":"ed-ponteiros","status":"publish","type":"post","link":"https:\/\/professor.norton.net.br\/index.php\/2022\/08\/18\/ed-ponteiros\/","title":{"rendered":"ED &#8211; Ponteiros"},"content":{"rendered":"<p><a href=\"https:\/\/professor.norton.net.br\/wp-content\/uploads\/2020\/08\/ed01.ppt\">Apresenta\u00e7\u00e3o sobre ponteiros<\/a><\/p>\n<p><a href=\"https:\/\/professor.norton.net.br\/wp-content\/uploads\/2020\/08\/ed02.zip\">Exemplo Ponteiros<\/a><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/t6Y_SOQQZd0\" allowfullscreen=\"allowfullscreen\" width=\"560\" height=\"315\" frameborder=\"0\"><\/iframe><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/4UKUFzszf4o\" allowfullscreen=\"allowfullscreen\" width=\"560\" height=\"315\" frameborder=\"0\"><\/iframe><\/p>\n<p><strong>Atividade<\/strong><\/p>\n<p>assunto: ed02<\/p>\n<p>Entregar Atividade no MS TEAMS<\/p>\n<p><strong>1- Qual o valor de y no final do programa?&nbsp;<\/strong><br \/>\n#include &lt;stdio.h&gt;<br \/>\nmain()<br \/>\n{<br \/>\nint y, *p, x;<br \/>\ny = 0;<br \/>\np = &amp;y;<br \/>\nx = *p;<br \/>\nx = 4;<br \/>\n++(*p);<br \/>\nx&#8211;;<br \/>\n(*p) += x++;<br \/>\nprintf (&#8220;y = %d\\n&#8221;, y);<\/p>\n<p><strong>2-Teste e explique a diferen\u00e7a, caso exista, entre<\/strong><br \/>\np++; (*p)++; *(++p);<br \/>\nb) O que quer dizer *(p+10)?<\/p>\n<p><strong>3-Quais ser\u00e3o os valores de x, y e p ao final do trecho de c\u00f3digo<\/strong><br \/>\nabaixo?<br \/>\nint x, y, *p;y = 0;<br \/>\np = &amp;y;<br \/>\nx = *p;<br \/>\nx = 4;<br \/>\n(*p)++;<br \/>\n&#8211;x;<br \/>\n(*p) += x;<\/p>\n<p><strong>4-Os programas (trechos de c\u00f3digo) abaixo possuem erros. Qual(is)?<\/strong><br \/>\n<strong>Como deveriam ser?<\/strong><br \/>\na)<br \/>\nvoid main() {<br \/>\nint x, *p;<br \/>\nx = 100;<br \/>\np = x;<br \/>\nprintf(\u201cValor de p: %d.\\n\u201d, *p);}<br \/>\nb)<br \/>\nvoid troca (int *i, int *j) {<br \/>\nint *temp;<br \/>\n*temp = *i;<br \/>\n*i = *j;<br \/>\n*j = *temp;}<\/p>\n<p>c)<br \/>\nchar *a, *b;<br \/>\na = &#8220;abacate&#8221;;<br \/>\nb = &#8220;uva\u201d;<br \/>\nif (a &lt; b)<br \/>\nprintf (&#8220;%s vem antes de %s no dicion\u00e1rio&#8221;, a, b);<br \/>\nelse<br \/>\nprintf (&#8220;%s vem depois de %s no dicion\u00e1rio&#8221;, a, b);<\/p>\n<p><strong>5- Escreva uma fun\u00e7\u00e3o chamada troca que troca os valores dos<\/strong><br \/>\n<strong>par\u00e2metros recebidos. Sua assinatura deve ser:void troca(float *a, float *b);<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apresenta\u00e7\u00e3o sobre ponteiros Exemplo Ponteiros Atividade assunto: ed02 Entregar Atividade no MS TEAMS 1- Qual o valor de y no final do programa?&nbsp; #include &lt;stdio.h&gt; main() { int y, *p, x; y = 0; p = &amp;y; x = *p; x = 4; ++(*p); x&#8211;; (*p) += x++; printf (&#8220;y = %d\\n&#8221;, y); 2-Teste e <span class=\"readmore\"><a class=\"more-link\" href=\"https:\/\/professor.norton.net.br\/index.php\/2022\/08\/18\/ed-ponteiros\/\">Read More &#8230;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[19],"tags":[],"class_list":["post-5041","post","type-post","status-publish","format-standard","hentry","category-estrutura-de-dados"],"_links":{"self":[{"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/posts\/5041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/comments?post=5041"}],"version-history":[{"count":4,"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/posts\/5041\/revisions"}],"predecessor-version":[{"id":5469,"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/posts\/5041\/revisions\/5469"}],"wp:attachment":[{"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/media?parent=5041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/categories?post=5041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/professor.norton.net.br\/index.php\/wp-json\/wp\/v2\/tags?post=5041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}