Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

So i\'m trying to make a program that reads from a file , What am trying to do i

ID: 3626950 • Letter: S

Question

So i'm trying to make a program that reads from a file , What am trying to do is ccreate an array that would print a) prints the content of any arrays of ints , b) and also prints the only odds ints in that array , c) and want to print out the indices of the odd ints in any array. btw , this is an array of 10

I want each function to be in a file , and call up it from main. so here is what i have so far , idk if am doing this right

#include <studio.h>
#include <stdlib.h>

#define ARY_SIZE 10

int x [ARY_SIZE];
int numbers;
int *fpdata;

if (!(fpdata = fopen ("myfile", "r")))
printf("error") , exit;

// i think i have to create a loop here
for( int i = 0 ; i < size , i++)
scanf ("%d" , &x [ARY_SIZE];

// calls here?

i'm not sure , i'm kinda lost , please be specific when writing code , and also put comments in between , because i need to understand this , so i can do good on the test.

Explanation / Answer

hi there this the arrays u want each in alone function all what u will change is reading from the file instead of reading from the keyboard and u have a very big mistake it is stdio.h NOT studio.h keep that in mind if u have an exam soon :) PLEASE RATE #include //it is stdio.h not studio.h void print(int arr[])//the array is passed here without the size { printf("%s ","the numbers in the array are"); for(int i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote