Advertisement
F3rnando

vetor gets

Jul 28th, 2016
3,419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. main(){
  3.    
  4. char v[8];
  5.  
  6. gets(v); // substitui o scanf, o comando gets forca que cada letra digitada seja alocada em uma posição diferente.
  7. printf("%c",v[3]);
  8.  
  9.    
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement