Lab 4 Function and Pow.docx - DEPARTMENT OF INFORMATION...

This preview shows page 1 - 4 out of 6 pages.

DEPARTMENT OF INFORMATION TECHNOLOGY & COMMUNICATION POLITEKNIK SEBERANG PERAI DNS PROGRAMME (DEC2013) FP201 PROGRAMMING FUNDAMENTALS LAB EXERCISE 2 NAME : AHMAD FARHAN BIN ROZALI 10DNS13F1041 ANIS NAZHIRAH BINTI MOHD ZAHARI 10DNS13F1034 AIMAN NAIM BIN MAHAMAD 10DNS13F1042 LECTURER’S NAME : PN NOOR HAFIZZAH BINTI ISMAIL %
Image of page 1

Subscribe to view the full document.

Learning Outcomes By the end of this lab, students should be able to: Define function, function prototype, local variable, return statement and parameters declaration list Use function calls by value and function calls by reference Compare built-in function and user defined function Write C++ program using function Hardware/Software : C++ software (Microsoft Visual Studio, Turbo C++ 5.0/6.0)
Image of page 2
1. Write a programme using a function statement, and the programme can do multiplication process for two numbers. The sample of output is shown as below: Please input first number to be multiplied: 5 Please input second number to be multiplied: 7 The product of your two numbers is: 35 2. List all FOUR differences between 2 types of Function :
Image of page 3

Subscribe to view the full document.

Image of page 4

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern