Introduction to Computers Programming (ICP-132)

Main Page

Assignment 01
Assignment 02
Assignment 03
Assignment 04
Assignment 05
Assignment 06
Assignment 07
Assignment 08
Assignment 09
Assignment 10
Assignment 11
Assignment 12
Assignment 13

Coding rules (pdf)
Sample code
Prob: Set 1
Prob: Set 2
Compiler options
Submission

Forum
Teaching Assistants
Links
Trivia

Assignment 6

Consider a structure S that has two real number members x and y. If A, B and C are instances of S, demonstrate functions that:

a. Adds corresponding elements of structure S where the structure are two real numbers x and y (as if C=A+B and S is a 2x1 matrix).
b. Subtracts the corresponding elements of the first with the second (C=A-B).
c. Multiple the corresponding elements of the first with the second
(C.x=A.x * B.x and C.y=A.y * B.y)


PS: The program should be coded in both C and C++.