C programing array problem Arrays keysList and itemsList are already-defined int
ID: 3564100 • Letter: C
Question
C programing array problem
Arrays keysList and itemsList are already-defined int types and initialized. Each is of size SIZE_LIST, already defined as int and initialized. For any element in keysList with a value greater than 100, print the corresponding value in itemsList followed by a space. Loop variable i has already been defined as type int. Example output if keysList is 42, 105, 101, 100 and if itemsList is 10, 20, 30, 40 is:
Since keysList[1] and keysList[2] have values greater than 100, the value of itemsList[1] and itemsList[2] are printed.
Below, do not type an entire program. Only type the portion indicated by the above instructions
Explanation / Answer
for(i=0;i < SIZE_LIST ; ++i){
if(keysList[i] > 100){
printf("%d ", itemsList[i]);
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.