Hemchandracharya North Gujarat University 2006 B.Sc Computer Science 103 Computer Fundamentals & Programming in C - Question Paper
Tuesday, 22 January 2013 11:10Web
AA-3403 Seat No. _________
1st Year M. Sc. (CA & IT) exam
March / April – 2006
103 : Computer Fundamentals & Programming in C
Time : three hours] [Total Marks :35
1 Do as directed : 5
(i) What would be the output produced by the
following program segment ?
int a,b,sum ;
a = 20; b = 30;
sum = a + b;
a = size of (sum);
printf (“%d \n %d”,sum,a) ;
(ii) What is initialization ?
(iii) Identify unnecessary parenthesis in the
following arithmetic expression :
(( x - y) * p) + q * (r * t)
(iv) Determine the value of the subsequent
logical expression, if a = 5, b = 10,
and c = -6.
(a / 4.0 = = 0.0 && b / 0.2 != 0 ) || c < 0.0
(v) Main is a user described function _________.
(True / False)
(vi) Long double data kind occupies _____
bytes . ( four / eight / 10 / 12 )
(vii) The subsequent is a segment of a program
x = 1; y=1;
if (n > 0 )
x = x + 1;
y = y + 1;
printf (“%d\n%d”, x , y);
what would be the output if n = 0 ?
(viii) Every line in a ‘C’ program must end with
semicolon ___________ ( actual / False )
(ix) The value of the expression -14 % 3= _____.
(x) What is a structure template ?
2 Attempt any 2 from the subsequent ques. : 6
(i) Income tax for individuals is calculated on
slab rates as follows :
Income Tax Payable
Upto Rs. 60,000 Nil
From Rs. 60,001 to
Rs. 75,000 10% of axcess over
Rs. 60,000
From Rs. 75,001 to
Rs. 1,00,000 Rs. 1,500 plus 25%
of axcess over
Rs.75,000
Above Rs. 1,00,001 Rs.7,750 plus 30%
of axcess over
Rs. 1,00,000
Draw a flowchart that reads the income and
Print the income tax due.
(ii) Give advantages and disadvantages of various
types of language.
(iii) What is a flowchart ? discuss symbols used
to draw a flow chart with suitable example.
3 Attempt any 2 from the subsequent ques. : 6
(i) Explain nested – if statement with suitable
example.
(ii) Discuss about for loop with example.
(iii) Write a complete C program to compute
the sum of 1st 10 Fibonacci numbers.
4 Attempt any 2 from the subsequent ques. : 6
(i) What is an array ? discuss 1 dimensional
array with example.
(ii) Explain subsequent string functions :
(a) strcat( )
(b) strcpy( )
(c) strlen( )
(iii) What is recursion ? Write a program to
calculate n! using concept of recursion.
5 Attempt any 2 from th subsequent ques. : 6
(i) Differentiate ranging from structure and union.
(ii) Discuss about defining and opening a file
in C program.
(iii) Explain the subsequent functions :
(a) initgraph( )
(b) outtexxy( )
(c) circle( )
6 Attempt any one 6
(i) Write a complete C program to swap value
of 2 variables using concept of pointer.
(ii) Write a function power that computes x
raised to the power y for integers x and y
and returns double – kind value .
___________________________________
Earning: Approval pending. |