Vous êtes sur la page 1sur 2

Note : 1.

Solve any 10 programmes


2. Each programme carries 10 marks

Q. 1 Write algorithm for the following :
a) to check whether an entere n!m"er is o # even.
") to calc!late s!m of three n!m"ers.

Q. 2 $raw a flowchart for the following :
a) to fin greater an smaller n!m"er from given two n!m"ers.
") to calc!late s!m of first 10 o n!m"ers.

Q. % Write short notes on the following :
a) & 'aria"les ") & atatypes

Q. ( )ccept principal amo!nt* rate of interest* an !ration from the !ser. $isplay +nterest
)mo!nt an ,otal )mo!nt -.rincipal / +nterest).

Q. 0 )ccept the salary of an employee from the !ser. &alc!late the gross salary on the
following "asis:
1asic 23) $) .
1 4 (000 105 005
(001 4 6000 205 705
6001 4 12000 205 805
12000 an a"ove %05 605

Q. 7 )ccept any n!m"er from the !ser. $isplay whether the n!m"er is ivisi"le "y 100 or
not.
Q. 8 )ccept a month in igit from the !ser. $isplay the month in wors. +f n!m"er is not
"etween 1 an 12 isplay message 9+nvali :onth;. -<se =switch>)
Q. 6 $isplay all prime n!m"ers "etween 00 an 100.
Q. ? Write a program to print the following pattern:
a) 1 ") 1
1 2 2 2
1 2 % % % %
1 2 % ( ( ( ( (
1 2 % ( 0 0 0 0 0 0
Q. 10 Write a program to swap the val!es of two n!m"ers. $o this !sing call "y reference
metho of f!nction.
Q. 11 Write a program to accept 10 val!es in an integer array. $isplay the n!m"er of o*
even* an negative n!m"ers.
Q. 12 )ccept any two strings from the !ser. $isplay whether "oth the strings are e@!al or
not. -o not !se stanar f!nctions.)
Q. 1% )ccept any string from the !ser. &onvert case of the string to lower # !pper !sing
pointers. -if entere string is in lower case convert it to !ppercase an vice versa.)
Q. 1( )ccept any two n!m"ers from the !ser. <sing pointers swap the val!es two n!m"ers
witho!t !sing thir varia"le.
Q. 10 &reate a str!ct!re to store the employee n!m"er* name* epartment an "asic salary.
&reate a array of str!ct!re to accept an isplay the val!es of 10 employees.
Q. 17 )ccept a file name from the !ser. $isplay the contents of the file. )lso a the
entere string to the file.
Q. 18 a) )ny n!m"er is a comman line arg!ment. Write a program to isplay the n!m"er
in reverse orer.
") Write a short note on en!m

Vous aimerez peut-être aussi