View Single Post
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Help! C program w/Pointer Notation to Convert Text

 
0
  #2
May 1st, 2006
> void main(void)
http://faq.cprogramming.com/cgi-bin/...&id=1043284376

> gets(text);
http://faq.cprogramming.com/cgi-bin/...&id=1043284351

Here's a little program to show the same thing using arrays and pointers
  1. #include <stdio.h>
  2. int main ( ) {
  3. char test[] = "this is a test\n";
  4. char *p;
  5. int i;
  6. for ( i = 0 ; test[i] != '\0'; i++ ) putchar(test[i]);
  7. for ( p = test ; *p != '\0'; p++ ) putchar(*p);
  8. return 0;
  9. }
Reply With Quote