Hi experts : i have a question that i hope to find an answer here whats the fast way to assign values to array with a elements less than 20 direct assignment or using loop is this better : float arr[20] ; arr[0] = 0 ; array[1] = 1 ; arr [2] = 2;…..;arr[19]=3; or this way : for (int i = 0 ; i < 20 ;++i) arr[i] = i; thank to you in advance

Hi experts :

i have a question that i hope to find an answer here

whats the fast way to assign values to array with a elements less than 20
direct assignment or using loop

is this better :
float arr[20] ;
arr[0] = 0 ; array[1] = 1 ; arr [2] = 2;…..;arr[19]=3;

or this way :

for (int i = 0 ; i < 20 ;++i)
arr[i] = i;

thank to you in advance

Don't hesitate - Save time and Excel

Are you overwhelmed by an intense schedule and facing difficulties completing this assignment? We at GrandHomework know how to assist students in the most effective and cheap way possible. To be sure of this, place an order and enjoy the best grades that you deserve!

Post Homework
Top