C
C
1l
Progra,mmin1
Subiect: - Computer "FJ! "0J)
Pass Marlc
,/ Candidates are required to give their answers in their own words as far as practicable. ,/ Attempt All questions'
'/ Thefigures in the margin indicate Full Mqrks.
/ Assume suitable data if necessary'
1. a) What is computer program? Discuss in brief about different generation prograniming languagis.
[1+4] b) Vfhy is algorithm and flow chart development important in problem solving? Write an .
' algorithm-and draw flow chart to test a number entered by user whether it is even or not. 12+31
a) What is the identifier? What are the ways to give value to variable? Explain with
2.
example? [1+2+1] b) Explain about input and output function available in C with syntax and example of
eachpart. [Z+2+2] a) Write algorithm, draw flow chart and program to input a number check it is
I
[2+2+21
Armsffong or not. b) What do you mean by selective and repetive statement? Why do we need break and continue
statement? t2+21
a) What do you mean by "call by value and call by reference"? Explain it with suitable
4.
L4l
example.
b) Can we pass whole array element from the function? Write the program to pass an t6l
array to function and sort them.
I4l
a) Write a program that finds the largest word in a given sentence.
5.
b) Differentiate between the methods of passing argument to function with example. t6l
What are their advantages and disadvantages?
What is structure? Why is it necessary? Write a program to add two distances given in 6.
feet and inch
format rlring
***';X:r.:: **ut orrollowins prosram, explain.
structure. [1+1+6] a) what is
nuu
ff
7. [1+3]
int mainQ
{
if( ! NULL )
{. prinff("C programming is easy");
else
printf("C programming is not easy");
return 0 ;
)
b) Write a program to calculate the length of string without using string handling t4l
function.
A file name employee.txt stores employee name, employee id and employee salary. Write
8.
a program to diiplay the detail of all employees in the order of their salary.
[8]
r 10 inteers from user and short them in ascendin
ItI
A2 ,I'RIBHUVAN LNIVERSITY
INSTITUTE OF ENGINEERING
Examination
Control Ilivision
2074 Ashwin
\: l.
.,
L.
whaj a1e
c-omp]rter
programming? are program
programs and computer Explain the steps that
required to build a computer foisorving a certain pioblem.
that precedence execution expression. program
Explain with an example the rgle and associativity play in the of an Rewrite the following
and
by correctiag any effors, if present also write down the output of the corrected code. Define MAX 5,
int main { }
{
int case[M&(l=12p,5,4,10],i,sum=0;
for(i=O,kMAX,i+=1)
{.
%d
print("Case = %3.2d\n',,i,case [iJ);
SUm +=+ CaSe+i;
h
average = sumlMAX;
ge}
pr i ntf{ "7o06. 2f ', ave ra ;
return 1;
,
12+61 [4+4J
3" a) Compare if-else-if la<Ider and switch construct with example and flowchart. isl
functions
b) ]vrite a Program in C to generate following pattern using unformatted inpuloutput onlv. [-{]
al
t\
FF>
PFPP
aaaaa
LLLLLL
F
aa
LLL
4' v/rite a program in c to find out whether the nth term of the Fibonacci series is a prime number or not' Read the value of n from the
main user-defined generare
user and display the result in the function- use separite functions ro r#';in il";;;;; i.rr" *0," check
prime or not.
whether a nurnber is t8l
t 5' a) How two dimensionar a*ays are created i1,c plgramming? write a program squaxe matrix of size NxN to read and find sum of
is parindrome
botir ailgonJ.. -' yvrrre a program to t) [z+4] xilHffif;ffi in C to check
whether a given srring or nor using
user
'
structures 12+41 nested skuctures?
stmcture hold number
Explain and create a x+iy' write a program to any complex that
uses tt" t*"t* to read two comprex numbers and dispray a third cornplex number which ir1rr" *Jiiprication orth" 8' """r*
""rpl;;;'#;;t t3+51 "' ,H;lHoT*fr:J*ut/output tuncrions used with data files in c? Explain with b) write a program I4l in
integers say.s..no,,. the
c to read from user until user After reading lff.Hff.r*le odd numb." io-u nr" "u'";dd;;'",
*" even number recursive functions?
to file 9' when can we use I4l Iev ao we need conftor statem€nts programs? Differentiate
between do...while characterisrics
in computer *a ror rrui"i"-;,:'.*", srarem€nts in com; l0' what are [2+2+z] the of
05 TRIBHUVAN UNIYERSITY
,t INSTITUTE OF ENGINEERING
Examination Control Division 2073 Shraw&n
ALL (Except B. Arch)
Fy?irsl:_9g_*sggrlss*jss(9ruJ)
Candidates are required to give their answers in their own words as far as practicable. Attempt AIl. que stions.
TheJigures in the margin indicate Full Marks.
Assume suitable data if necessary.
b) What are the advantages of a Flowchart design? Write down the guidelines to be followed to draw a flowchart.
a) What is the purpose of the semicolon that appears at the end of most assignment
2.
statement in C? Explain the program compilation, linking and loading process with example.
b) Discuss the types of errors in programming. Horv do you debug a C-program? a) Explain relational and logical operators.
3.
b) Write a C program to display following pattern without using formatted inputloutput statements.
Programming
rogrammin
ogrammi
gfamm
ram
a
with
a) Why do we need control statements? Compare switch and if-else-if ladder example. .
4.
b) What are overflow and underflow elrors in context of array? Write a progffim to add corresponding elements of two
arrays. The results should form a new array. a) Why should we prefer structure over array? Explain nested structure with
example.
7.
b) Write a progfitm to read name and roll number of 48 students from user and store them in file. If the file already
contains data, your progftlm should add new data at the end of the file.
b) Write a FORTRAN program to read n numbers and display largest number among
[1+3] 12+21
[2+41 12+4) t4l
t4l
t4l
t6I
tsI
t5l
t4l
[2+4] 12+41
t6l
tsl
',*
05 TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERTNG
Examination Control Division
2A72 Chaitra
1. a) What is a flow chart? Use the various commonly used floW chart symbols. How does
b)
2. a) b)
a flow chart help computer programming?
What is a program? Brietly describe types of computer software. What is an operator, datatype, constant and variable? Define.
Define and write syntax of the following:
t getsQ
ii) putcharQ
iii) scanfQ
iv) strlen$
[2+2+21 I2+2\
t6l
t4l
a) How is the switch statement used in decision making? Explain with a suitable
3.
t4l
example.
b) Write d program to read structure "college" having name, estDate and location where estDate is an another structure
having day, month and year as members. Display the
records of l0 colleges.
a) What is a data file in C? What are the modes in file handling? Explain briefly. b) Write a program to read the
information of a file named "data.txt" and write its contents to another file "record.txt".
a) Compare DO and implied DO statement in FORTRAN.
b) Write a FORTRAN program to add and subtract two matrices and display the results in matrix form.
t8l
[1+3]
t6l
t3l
t71
'3?. ..,
/
r'.
r'
1. a),,
b)
3. a)-
a_-
l;.
.,
i
b) Write
the element
8. List different tlpes of stsdard VO [pes of goto statements in FORTRAI{
used iu C. Write aprogrysl age of five to write name, roll
shrdents into a disk file aame "
STUDENT.DATU. 9. a) Explain differe,nt
read n from user and display
3)+(1+2+3+4)+....
[4+4] -...I1
example. Write aprogram. to till ns terms:
1+(l+2)+(1+2+
b) Explain with suitable example to show how an Impiieri Do loop works in FORTP,AN. ' t4I '
:*r.*
P.1.21,
05 TRIBIIUVAI.I UNITERSITY . INSTITUTE OF
Examinaticn,
2A7L
b) WriteaCprogrqm that
computer- rearra[ge tlren@es with example that
"Array*
Level BE Futll!(!rLsl 80" Prograqme
AII @xceptB. Arch) P+s,! Mar.F Y.ear /'Part
t4I
is indiiectly a pointer". Write program
to
7.. Iltustate calctrlate sum and between
M'and N (where value of M and N are
read
numberi
average of integer
from keyboard) usingpointer
8. Write a program to contiduously read
rvtme, age and salary of a worker and write it into a
file rmtiiusir confirmsio end- Then read n from
user and display the n6 record in the file. Details of 14+4J
worker must be represented by a sEtrcture.
9. a) Compare arithriretic and logical if
staternents inFORTRAN tl
b) Write a FORTRAITI prograrn to display U1
:1.
I {.*
P.1.22
lj
05 TRIBHUVAI.IUNIVER.SIfi
'l
Fult [Grks
Eram.
ExamiRation Control Division
W.ritp qmtan,
i) pintf( )
:1..j,
,,
'r;...-: '-
. rlrl..-.i, ,
.i;; f.
'Ir ::
i' ': '
.
I I . ,,i '
Ycar./Part Ut .:,.
Time
program
8
Level Programme trIl (Exc-eptB.Arch) iass Marks
:J.: order.
,.
,Each sales of a Calculate .-
a)
4bout
'6. t4l
a) Write a
3,'sales.
by the user. g.
the details and rank of employee given . t8] a) What do you mean by formatted
and unfonnatted input/output statements in Fortran and also give suitable example which explain the
.
concept of Formatted UO. t8l b) Write the program to convert a binary number to a decirnal
number using Forkan progra@ming language. t4l t** :
P.1.23
05 TRIBHUVAN I.JNIVERSII'Y c11 r
Bxam.
INSTITUTE OF ENGINEERING -
Examination Control Division
2070 Ashad
(
Lev-el- Full Marks 80 Programme All Except'
.
2. *z'1l What are relational operators and 6. What do you mean by nested structures?
with examples., Give suitable example. Write a program to read '
assignment ffperators? Explain
the Heights of two students and display the
'b) Rewrite the following program by difference between their heights. Use feet and '
inchcs as members of a structure to define height.
correcting any syntactical errors, if presend' 'a)
7. Compare array and pointer with example.
Also show the output of the corrected code.
b) Write a program to read a string from user
#Include <stdio.h> "o and use a user defined function to copy the
( content of the read string into another
int main )'
t character array changing lower case letter to
' float root int i= I; upper if any. Use pointer to process the string.
do sum=2i- l; 8. Write a program to read the details of book
{
print ("\P/od\n,', sum)q authors and write it to a file, until the user -
confirms to end. Then read and display the nh
i *- 513;
record in the file, where n is read from the ' user.
while (swn <: [5) The data for authors must be represented by
I structures that contain name, nationally and
root = pow (i, l/2); number of books published.
print ("\n7o.3f ', root);
v ;,9. a) Explainthe FORTRAN structure. What
return void; are data types in FORTRAN.
) rprlt" to solve
t) a prog1am in FORTRAN
v \tr/rite a program to read the number until - I quadratic equation and displav roots in ptoper
12+61 t3l
tsj
t8l
12+21 rbj
t6l
t4I
1
I
't
I
I
-
I
-l
I
I
-'1
I
-1
t2
, l2o .
22 TRIBHUVAN I'NIVERSITY Exam. Old Back Q065 & Earlier Batch) Level BE
INSTITUTE OF ENGINEERING
Full Marks 80 Programme BEL, BEX,BCT Pass
Examination Control Division 2070 Marls 32 Year / Part Ul Time 3 hrs.
Chitra
Subject: - Computer
Programming | (EG442CT)
{ Candidates are required to
give their answers in their own
practicable.
words as far as {
Anempt All
questions.
{
margin
The/igures in the
tndicate Full Mailcs.
{ Assurne
suitable data if necessary.
t. Why do we
need
programming
language? Write
down the
advantages and
disadvantages of
high level and.low l9v9f programming languages. Write an algorithm and flow chan to check
[Hint year is a leap year if it is divisible.
whether the given yedr is a leap ]reaI or not; ^ -
2. What do you mean by operators? Explain differcnt operatorc along with their precedence and
associativity. Write a program to count the number of vowels in a string you ar€ not allowed touse
library functions. 12+2+61
3. What is a nested if-else statement? Explain it with an example. Write a program to find the largest ofthe
three numbers using a nested if-else statement. U+2+11 4
Compare while loop, for loop and
do-while loop. Write a program to evaluate the following series until the difference between the two terms is
xt .S-=f+3-+-+...
less than 0.001. [3+7] 13 " 3., 5!
5. Explain why we need function in programming, Write a function to check whether a
number is prime or not and use the output of that function to print prime numbers from I to n
entered tiy the user. 13+71 6. What is a pointer? Write down the relationship of aray and pointer.
Write a function that takes string as an argument and return the number of characters in the string. Also
return by
converting the string to upper case. Don't use library function. [l+2+71
;
How is nested structu€ formed? Explain with example. Write a program to perform
additioq subtraction, multiplication and division of complex numbers. Make separate
functions foleach operation. tl+2+77 What are binary and text frles? Write a progftm to
write any structure information in a
E.
binary file andtotead and displayillater . Make a menu driven program to read and display
05 TRIBHWANI,JNryERSITY Exam.
lltcgular Level
,BE
Full Marks 80
INSTITUTE OF ENGINEERING
Examination Control Programme AII @xcept B. Arch) Ur
Division 2070 Chaitra Pass IVIarks 32
,/ Q=o>b?aib; 3
+a;
'6 = (a++) + (b-) V
c= c+t_*b_-i S
b) What are the difference between formatted
and unformatted UO statements? Describe with
Pu
PUL
PULC
{'
Pul.cH
pulcHoW
PULCHOWK
/
4.\af Dqfine "firnction definition" and write the program to find the sum of tu,o numbers using
user-defined functions. t{L yI Wtlm;t do you mean by "call by value and call by
reference" along with suitable
: -:
examFle? I{] S/Canwe pass whole array element from funotion? Write a
program to display only those students infomration which are passed. Use separate function to
check the result of student. The information of students like Name, Roll No, Address and Marks are
passed from mainArnctions and pass to functions using array t)?e arguments. L2+8I
A. of t5,pedef of keyboard in structures.
r{nxplain the use -/' 12) b) /xplain the need.of nested
structure. Writeia C program to convert data in BS to data
y-/ in AD using structure. Use the data
l4J
t4l
t4l /
a FORTRAN program to read m*n matrix, transpose it and display both the
Srf'W;te
**
il
,]
;i -ll.
i
,..-,,,,,.. . -.
. -r -.-.,',i.J'
ri
li
I
I
i
i
:
I
''t:; .
-l
Examination Control Division
I
2069 Ashad i'
I
I
s
i
/ Candidates me required to give their answers in their owr: words as far as practicable.
')
{ Auempt.AlI questions.
l
Vt Dry"rentiate between high level and low level. Explain the steps of solving a problem
II
I
-.$--Wlile pas,!y.lalrl9;,_
$to:un sieniticance qf u'pin()$n-ction in Ci Diftereajate betwe_en v :e
Describe both witJr meaningfuIexample.
and pass by reGrEnce arguments.
! - 12+61 {
5,. Explain how array can be passed to firnctions. Write a program that passes an array to a \/
element.
firnction and print the largest and smallest \ [2+61 -Q How are sEuctures different from
arrays? Create a structLue in C to store the name of a
v batsman, runs scored and no of times the batsman in dismissed. ln the pregram, read the data
of five players and display the batting average of the player whose name is entered
Wnte
by the user. Batting average is given by totalruns/total-dismissals. ,t [2+61 l-
down advantages of pointer. What type of arithmetic operations can be
t implemented in
pointer? Also describe the relationship between array and pointer with [2+3+3J appropriate syntax
and examples. ,f 8. Write a progr.un in C, to read the following information for 96 shrdents.
Student Name, Student roll number, Marks obtained(in 100)
Record all data in "ioe.txt" file, and program should print roll number and name of
student who have obtained greater than or equal to 40 marks. t8] 9. Rewrite the following
source code correcting any error present in it. Also indicate the error corrected in comment. Then
write the output of the program. 14+41 ,
?
/program to convert
.rL.
list
of
temperatures
L
/in Centigrade to Eahrenheit .
*inclucie stdio-h; 8'
int main ( )
{
int i, n-3;
float celc Ini , faren In] ;
6sg1i=0; i<n; i++)
{
. Print ( "CeIc t tdl =" )
scanf ("td", ceicIi] ),'
]
celIil);
-
I
:l
them in array,
,,I
10. '/
i;cel2far(float f, float c) *lJile
I., e
{ f = 9/5*c+32; !; i,:
it with implied
\
.11. What exampie. ['+.1 j
l/-
***
v
the syntax of two dirrrensional in FORTRANI Expiain \{ith
i,
/
---*
"05 TR]BHWANUNIVERSITY INSTITUTE OF Year / Part ilr Time 3 hrs.
ENGINEERING Examination Control
Division 2058 Baishakh
Exam, Resular / Back
Level BE FulI Marks 80
Pass Marks 32
B.Arch)
t'
Candidates are required to give their answers in their own rvords as far as
practicable.
{ Attempf&.qtrcstions. ,/ Thefigures in the
Fu!!@fu.
margin tndicate / Assum.e suitable data if necessary.
1. What is high level language? Write different types of high level programming languages with their
examples. Hpw compiler is different than assembler programming language? [1+4+3]. '.'2. What is a
pseudo code? How is it different from an algorithm? Draw the flowchart to solve the multiplication of two
matrices. U+2+51 l. Write a hierarchy of operations of the following expression in computer
programming C: IEOF tt B-Salary + Daily-Allowance > 8000&& eligible_code =: 1tt nelpay>10000. Write
different forriraited input output used rn For Tran programming language. [4+4]
4. Write a program.in C to calculate the frequency (F) for different values of cap.acitanees(C), for a certain
resistance the darhped natural frequBncy is given
electrical circuit. with an inductance (L) and @),
by-F:./11tll.Ci-Cn'zl+C11.-It is.iequired to study ttr'e variation ottiis
frequencyw^ith capacitance
defined.function.
starting frbm 0.0.1 to 0.1 in steps ofb.01, and calculationlhould be,dohe.u$ing uqbr [8]
5. Write a syntax in C- programming wittr example of the following: "scanf', single statement
"do....while", "strcpy'', structures with arrays. fax?J 6. What are the rules that govern the passing of
arrays to user defined functions? Compare'"user defined
functioni' and "switch" in C- programming language. [3+5] 7. What are the importances of "Pofutters"
in C programming language? Write the output of the following program. L4+41
# include<conio.h>
voidmain0
, t int k; int.a[ ] = {1, 2,.3};.int*b[3]; int **c[3];
**,Fe[3J.
int***d[3] ; int* 1o1**** *,f[3];
clrscO;
What are the inputs and outputs functions used with data frles? Explain, error handling process d-uring
reading and writilg in a data files. t5:31 i0. Write a program in ForTran to test whether the acceptcd year
is leap year, or not. (Hint: A year is
leap year if: the year is divisible by 4, but not by 100 or the year is divisible by a00) t8l
rl
:1.
{.*
I
t
il
tl
l
I
tilr
I
i
I
\
,,:a
2068 Shrawan
(2066
Exam. New Back Batch & Later) . Level
Subject: - Computer
Programrning
'/ Candidates are required to give
their answers in their own words as
Attempt
practicable.
far as ,/
All.questtons-
./
Thefigures tn the margin indicate
l:ull,Mqiks.
,/ As-rume
suitable data if necessary.
1. Define algorithm. lVrile an algorithm for finding largest and smallest values from a list. [2+6J. 2.
Draw a flowchart and algorithm to find roots of a quadratic equation (ax2 + bx + c : 0). Include all
three conditions of thedeterminant. I [10] 3. Write a program to read values from user and
find sum until user types 0, also display sum and average. t8L 4. &Ihy prograillmers prefer
using user d.efined functions? What is merits and demerits of using functions in program?
Differentiate actual and formal parameters used in functions.[3+2+3J - 5. Write a pro$am to take a list
of values from user into an L$ay. Pass the list to a function which sorts thq vaiues in ascending order.
Display the sorted list from main program. [315] 6. Write a proglam to represent cornplex
number by a structure with real and imaginary as members. Take 2 complex numbers as input from
user into structure variables. Pass the complex numbers to a function which calculates sum and returns
it. Display the sum from anothgr tunction displayQ. [10] 7. What is the role of pointers in
passing parameters to functions by reference? Give example, how 2 dimensional array can be
accessed by a pointer. 14+41 8. \lhat do you mean by opening a data fiie? Iiow is this
fread, fwrite functions. [l+3+4]
accomplished? Explain fscanf, &rintf, g. Explain the skucture
of a FORteX program. Differentiate between arithmetic and logrcai if statemenl 1Z+Z1t 10.
Write a program in FORTAN to read two matices from user, find their srmr and display the sum.
t8l **rf
L
I
i
I
i
ir
i
I
i
1
I
-
t
I
'1
I
I
I
I
-''l
i
I
-t
i
I
I
I I
I
1
prdcticable.
{, Candidates are required to give their answers in their oum words as far as { Auempt All
questions. Marks.
,/ Thefigures inthe margin indicate Fult / Assume suitable data if necessary.
1. What is high level language? What are the different types of higfu lwel languages? How
computerprogramming language C is different from FORTRAI.I? [1+]t{ 2. 'Write an
algorithm aud flowchart of the distance betwee,n two points (xr, yr) and (x2; y2),
I
(xz *r)' + (yz- y1)2. Where, xr, xz, yr, yz ari given by user,
govenred by formula Dz = -
I
ts+fl'"
.::... ... ,
1-',.'E;;;
r'=
1= ,
Where x, is the'mean of the values.
7 . 'Write a prograur in C programming language accor<li.g to the output displayed below: (to
open a file named RECORD.txt for the n number of data where Cost, Service Charge 5o/o,
[0]
VAT 15%, and Total Cost must be calculated by program itself).
Output is:
Item Code Description Rate Ouantitv Cost OOlCT Computer 22.000.00 5 110.000.00
007M Cell Phone E,C'00.00 IO 80.000.00 VAT 15-"/C
Sersice Charge 5%
Total Cost
Thank You!!! Visit Again
8. Rewrite program correctly and write .oritput of
I
# include conio.h
I
main(
void ); t8l
{printf ("\nArray l:
o/oc\n",
arl);
Cf"arrayz:o/*Yl',lr2,)i'
I
riit"tf
l
:
I
i
,I
Jushfy the statement with suitable example. 12+21 b) Draw a florvchart and then rvrite a program to
read three ,iau, oi
" ri*gt" and print
or
area for vaiid data and to print "Invalid data" ifeither one side oftiangle-is greater ' equals to thq sunq of
othertwo sides. [Area=
66:AGTC;O, where a, b, c are t"'. ""= ..,,
'
threesid.dsands=(a+b+c)/2. .' . .' _ t4]
2- a) b)
3. a) b)
4a) b)
s. a) b)
6. a)
,,
'7." a), b)
Describe the meaning of Write a program in C to find trace factorial and other calcuiates
precedence.and associatively and norm of a matrix. Trace is power of anumber.
of operators with suitaLle defineC as the sum of principal Wlry pointer operator is called
example. How much memory is diagonal element; Nonn is defined indirection
operator? Give
required for long integer and its as square root of the sum of example.
range? the.squars of all the eiernents
to check
inmatrix. Write a C program
Write a progam in C to calculate
the sum of given series up to the Ciassify the variable according to ryhether the given sfting is
term given by the user. : the scope aod exteqrt (Storage palindrome or not. Palindrbme
class) with C. Write a program in shorild be chEcked by user defined
2/x2 + 3lx3
Y = L 12 - C which calculates F, where p,=
function.
-.................,........... What are the differences between
Distinguish betrveen call by value (a t bn)/ c!,and n is. an integer. malloc( and calloc( Wheu we
) ).
and call by reference with exampleFor designing above program,
in C. use two functions, one calculatbs
use realloc(
).
Write a C program to read n
integer numbers in an array
dynamically and create two
functions to sort in ascending and
descending order and display the l3l
result in the maiu function. b)
Discitss [6r'r arra] of strings can be9' a) b)
stored in.ai-ray of pointer variable.
Write a C p'rrsglam to enter the
strings uatil the user enteis "end';
and display the list of string in
aiphabeticai order using two 10. a) b)
[2+41 l4I
12)
.t6l
121
t6l
t3l
tsl
[2+1]
tsl
t3l
tsl
-t!
i
-l
I
I
8. a)
Explain nested struchre in C, with
example.
Write a C program that illustrates
the pointer pointing to the assignment operator. Explain
function. How can we'pass with exa:nples.
.
l2l
structure variable as a pararneter Write a program in-C to create
in function. Illustrate with an a file named "subject.brt" that :r,".;
exari,rple. stores subject name, subject code 1
r' ,j;.
-- 1.- :-*'r'+-;lit,,!a;ir-::..1ilt;:,.-:;.i:.f l-: ,.,,.,-.)t.. '., ,. ..-
1 -.. .:..i:.-:::-::. :.i: )
/ Candidates are requhed to give their answers in their own words as far as
practicable.
{ Auempt All.questions. t Thefigures in the margin indicate Full
Marlis.
r' Assumb suitable data if necessary.
I.- E
1. a) b)
.2. a) b)
3; a) b)
4. a) b)
5. a) .b)
them to a function where the second dispiay the results in the main functien.
sh'ing is compared with the reverse of the
first string on the chanicter basis and [1+i]
display the message in the main
function. You are'not allowed to u1e.!he
sting functions. l6l
-8. a) 'Illushate the self referential
ll+11
I sbucture and the position pointer. ''':
6. a) \Mhy do we need IIMA? Explain b) Write a prograur that illustrates
the significance of calloc( ) with example. passing function address to other t61
--'
using
functions directly and Pointer. ,F+tl
b) Write a pro$am that reads positive 9. a) Sketch the bits assignment in a
integer nrunbers into an aray
stuctue if.you have 7 bit fields of 5 bits l6l
dyna:nically and pass them to a function length each. Justify the bytes
where odd nudrbers are filtered into consumption by above stnrcturc with
another array and disptay the array reasoning. t2l
containing odd numbers in the main
functiou. b) Write a progrurm to compute any
two instant memory spaces in a format
7. a) Mention the applications of t6l
(Kilobytes: Bytes: Bits) using stnrcture.
pointer. Illustrate the invalid and valid
Build functions to add and subkact given TT!
b) Write a program that first appends the from
binary file and display the file. The file
customer records ia a the number of
name
customer records as well as the contents
should be given by user and display if it does not exit.
l6]
i
I
I
I
I
I
-1
I
I