1. The document provides instructions for two programming problems in C for a Structured Oriented Programming exam.
2. The first problem requires writing a program to calculate the average mark of students for an exam, using a repetitive structure like a loop. It also asks to rewrite the program using a different loop.
3. The second problem requires writing a program that allows the user to select and generate one of three patterns by entering 'a', 'b', or 'c'. It must print an error if an incorrect option is selected.
1. The document provides instructions for two programming problems in C for a Structured Oriented Programming exam.
2. The first problem requires writing a program to calculate the average mark of students for an exam, using a repetitive structure like a loop. It also asks to rewrite the program using a different loop.
3. The second problem requires writing a program that allows the user to select and generate one of three patterns by entering 'a', 'b', or 'c'. It must print an error if an incorrect option is selected.
1. The document provides instructions for two programming problems in C for a Structured Oriented Programming exam.
2. The first problem requires writing a program to calculate the average mark of students for an exam, using a repetitive structure like a loop. It also asks to rewrite the program using a different loop.
3. The second problem requires writing a program that allows the user to select and generate one of three patterns by entering 'a', 'b', or 'c'. It must print an error if an incorrect option is selected.
MID SEMESTER EXAMINATION (SEMESTER I) - 2011/2012 CS104-STRUCTURED ORIENTED PROGRAMMING (1-CREDIT) Time allowed: 90 min Answer A questions INSTRUCTIONS: Answer to each question; C file, must be save with !our re"istration number an the question number# $%": S&'((()&a#C, S&'((()&b#C an S&'((()*#C+ 1. It is required to calculate the student average mark for CS104 examination. Write down a C program to achieve this task ! using a repetitive structure "loop#. $ssume that there are n students. %our program must process onl! valid inputs. &hat is marks in etween 0 and 100. 'ewrite !our program ! using a different loop. "() marks# (. It is required to generate one of the following three patterns according to the user selection. *evelop a C program that facilitate the selection of a pattern ! entering a+ or c. &hen the program generates and displa!s the appropriate pattern. $ssume that option a+ and c represents pattern 1+ pattern( and ,attern - respectivel!. %our program must generate an error message when an incorrect option is selected. ,attern 1 ,attern ( ,attern - 1 ( ( - - - 4 4 4 4 ) ) ) ) ) . . . . . . / / / / / / / 0 0 0 0 0 0 0 0 (/) marks) 1 2 3 2 3 4 5 4 3 4 5 6 7 6 5 4 5 6 7 8 9 8 7 6 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *