May 13, 2012 #1 B baby_1 Advanced Member level 1 Joined Dec 3, 2010 Messages 415 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,298 Activity points 4,277 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); 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);
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); 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);