sami sam

sami sam

  • NA
  • 40
  • 29.4k

How can we use while in C Programming Language

Aug 7 2012 5:38 AM
/*Write a program to print a string using a for loop and the putchar function
Write a program to print a string using a for loop and the putchar function */
/* Assume Cat is a string */

#include <stdio.h>
#include <string.h>
char [80]
int i;

int main (){
    strcpy (s,"cat");
    i = 0;
    while(s[i] 1 = '0')
        putchar(s[i]);
    1 ++ i
    }
}

Answers (1)