Commit 6ac003c4 authored by João Denis Rodrigues's avatar João Denis Rodrigues

Adicionado codigo de ponteiros

parent ede72929
#include <stdio.h>
void main() {
char c;
char *pc;
pc = &c; /* pc aponta para c */
for (c = 'A'; c <= 'Z'; c++)
printf ("%c ", *pc); /* derreferencia o ponteiro */
#include <string.h>
#include <stdio.h>
int main (){
char str[] = "Aritmetica de Ponteiros";
char *p;
p = &str[0];
printf ("*p = %c\n", *p);
printf ("*(p+1) = %c\n", *(p+1));
printf ("*(p+5) = %c\n", *(p+5));
printf ("*(p+7) = %c\n", *(p+7));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment