Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
58 views1 page

Corrections in CS201 Handouts: Use of Operators, Error

The document summarizes corrections needed in the CS201 handouts. The first correction is to reverse the order of digits displayed for a 4-digit integer input by the user. The second correction is to add an asterisk in the function prototype to properly pass a double by reference. The third correction is to initialize the variable i before a do-while loop to avoid undefined behavior.

Uploaded by

mehboob hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views1 page

Corrections in CS201 Handouts: Use of Operators, Error

The document summarizes corrections needed in the CS201 handouts. The first correction is to reverse the order of digits displayed for a 4-digit integer input by the user. The second correction is to add an asterisk in the function prototype to properly pass a double by reference. The third correction is to initialize the variable i before a do-while loop to avoid undefined behavior.

Uploaded by

mehboob hafiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Corrections in CS201 Handouts

Page No. 29
In the topic Use of Operators, problem statement is incorrect.

Error:
Write a program that takes a four digits integer from user and shows the digits on the
screen separately i.e. if user enters 7531, it displays 7,5,3,1 separately.

Correction:
Write a program that takes a four digits integer from user and shows the digits on the
screen separately i.e. if user enters 7531, it displays 1,3,5,7 separately.

Page No. 95
In the topic Function Calling, program contains error.

Error:
Function prototype should contain asterisk “*’.

Correction:
#include <iostream.h>
void square(double *);
main()
{
…..}

Page No. 104-105


In the topic Sample Program 1, program contains error.

Error:
Value of variable i must be initialized before the start of do while loop.

Correction:

#include <iostream.h>
main( )
{
int c [ 100 ] ;
int z , i = 0 ;
do
{
…..}

You might also like