Professional Documents
Culture Documents
Usp 6
Usp 6
(CSE 3041)
SOA
Deemded to be University
e rs
int
Po
Poin
t ers
Problem
WAP to print the address number of a variable.
Program
j = &i ;
Problem statement
Write a program to separates a number into three parts: a sign
(+, -, or blank), a whole number magnitude, and a fractional part.
Fill in the chart by indicating the data type and value of each reference as well as
the name of the function in which the reference would be legal.
(Unix Systems Programming) Chapter-6, pointers, C programming November 21, 2021 17 / 32
Multiple Calls to a Function with Input/Output
Parameters
Write a function subprogram named order that swaps its input param-
eters (two in number) only if the first one is larger than the second.
Write a program to sort three numbers. Use the function written above
(named, order ) to swap its inputs if the first input parameter is greater
than the second input parameter.
Multiple calls to function subprogram order may be required to sort the
inputs.
Problem Statement
Write a program that scans a data line representing a common
fraction of the form
numerator / denominator
where numerator is an integer and denominator is a positive inte-
ger. The / symbol is a separator.
Close input and output files using fclose with the file pointers.
Write a program that processes three files to print Roll number of the topper
student in a class along with marks she/he scored in USP subject. You are
given 3 files as below: