Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4.2 TrustPilot
logo-home
Examen

INP1501 Assignment 2 COMPLETE ANSWERS 2025 (534354) - Due 10 July 2025

Note
-
Vendu
-
Pages
18
Grade
A+
Publié le
10-07-2025
Écrit en
2024/2025

Introduction to Programming IA - INP1501 Assignment 2 2025 (534354) - Due 10 July 2025; 100 % TRUSTED workings, Expert Solved, Explanations and Solutions. For assistance call or W.h.a.t.s.a.p.p us on ...(.+.2.5.4.7.7.9.5.4.0.1.3.2)...........

Montrer plus Lire moins
Établissement
Cours









Oups ! Impossible de charger votre document. Réessayez ou contactez le support.

Livre connecté

École, étude et sujet

Établissement
Cours

Infos sur le Document

Publié le
10 juillet 2025
Nombre de pages
18
Écrit en
2024/2025
Type
Examen
Contient
Questions et réponses

Sujets

Aperçu du contenu

INP1501
ASSIGNMENT 2 2025

UNIQUE NO.
DUE DATE: 2025

, lOMoARcPSD|21997160




INP1501/102/0/2025

Assignment 2: 2025 SUBMISSION:


Electronically via myUnisa


Please note that we automatically give five days extension for this assignment. It will be to
your own advantage to check after a few days whether the assignment has been registered on
the system. If you have not completed the assignment by the extension date, submit whatever
you have completed – you will get marks for everything that you have done.

DUE DATE 07 July 2025

UNIQUE NUMBER 534354
EXTENSION 3 days extension – 10 June



TUTORIAL MATTER Study Guide, Lessons 17 – 23

CONTRIBUTION WEIGHT TO
YEAR MARK
QUESTIONS Practical exercises



If myUnisa is off-line when you want to submit the assignment, you need not contact us,
because we will be aware of it. Simply submit it as soon as myUnisa is available again.
Question 1
Write function headers for the functions described below:

(i) The function check has two parameters. The first parameter should be an integer number and the
second parameter a floating point number. The function returns no value.

(ii) The function mult has two floating point numbers as parameters and returns the result of
multiplying them.

(iii) The function time inputs seconds, minutes and hours and returns them as parameters to its
calling function.

(iv) The function countChar returns the number of occurrences of a character in a string, both provided as
parameters.


Question 2

Find the error(s) in each of the following program segments and explain how the error(s) can be
corrected:

(i) int function1()
{

cout << "Inside function function1 " <<

, lOMoARcPSD|21997160




INP1501/102/0/2025
endl; int function2()
{

cout << "Inside function function1 " << endl;
}
}

(ii) int sum(int x, int y)
{

int result;
result = x +
y;
}

(iii) int computeProd(int n)
{

if (n == 0)
return 0;

else

}


n * computeProd(n – 1);


(iv) void aFunction(float a)
{


float a;
cout << a << endl;
}


(v) void theProduct()
{

int
a;
int
b;
int
c;
int result;

cout << “Enter three integers “ <<
endl; cin >> a >> b >> c;
result = a * b * c;
cout << “Result is “ << result <<
endl; return result;
}
3
$2.77
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
LIBRARYpro University of South Africa (Unisa)
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
10509
Membre depuis
2 année
Nombre de followers
4904
Documents
4809
Dernière vente
5 jours de cela
LIBRARY

On this page, you find all documents, Package Deals, and Flashcards offered by seller LIBRARYpro (LIBRARY). Knowledge is Power. #You already got my attention!

3.7

1453 revues

5
680
4
234
3
243
2
78
1
218

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions