i made a questionnaire in c, and everything worked until i try to make a summatory with if, if the answer is right its suppoused to add one, the questionnaire consists of 31 questions with 4 possible answers, example:
//i use a integer arrangement with 30 spaces for each answere just like this: int ans[30]={};
question 1 with correct answer equal to 1 (which is saved in &ans[0] )
if(ans[0] = 1 ){
i = s+1 //Ramdom variables i and s and s equal to 0 in the boxing allocation
finnaly i try to print i (after 31 times doing the thing above)
but the result is always 31 no mather if i answer every one wrong