Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] find the max index in undefined array index

Status
Not open for further replies.

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);
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top