baby_1
Advanced Member level 1
Hello
in this program how can i find the max index in undefined array index?(Num variable)(i assume 200 that you can see the error);
---------- Post added at 19:27 ---------- Previous post was at 19:15 ----------
i Solved it
for(i=0;num;i++)printf("%c",num);
in this program how can i find the max index in undefined array index?(Num variable)(i assume 200 that you can see the error);
Code:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
#include <string.h>
int i;
int baby(char num[]);
int main(void)
{
baby("Hello");
getch();
}
int baby(char num[])
{
for(i=0;i<200;i++)printf("%c",num[i]);
return 0;
}
---------- Post added at 19:27 ---------- Previous post was at 19:15 ----------
i Solved it
for(i=0;num;i++)printf("%c",num);