Continue to Site

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.

How can I get the maximum of an array?

Status
Not open for further replies.

fatma1000

Banned
Full Member level 2
Joined
Apr 30, 2006
Messages
147
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,298
Location
eygpt
Activity points
0
hi all
how can i get the maximum of array?
please get the code in c++

thanks
 

Re: help1 C++

int ar[] = {1,2,3,4};

int num_elements =sizeof(ar);
int num_bytes = num_elements/sizeof(int);
 

help1 C++

you can either call sizeof() function or calculate manually by while loop reaching end starting from 0 index
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top