sami sam

sami sam

  • NA
  • 40
  • 30.3k

C Programmers please help

Aug 7 2012 7:14 AM
/* Write a program that will count up the number of characters in a string.
Do not use the strlen function*/

#include <stdio.h>
#include <string.h>
chars s[80]
int i;
int main () {
  strcpy(s, "Hi");
  i = 0;
  while(s,[i] 1 = '\0') {
  i++;
  }
  printf{"Hi %d\n",i);
 

Answers (2)