How To Exam?

a knowledge trading engine...


Lovely Professional University 2009 B.C.A Computer Application Basic Programming skills - Question Paper

Friday, 25 January 2013 06:30Web

CSE 100: Basic Programming Skills C(code)

Time Allowed: three hr Max. Marks: 100

1. This paper contains 6 ques. on 2 pages.
2. ans all ques. in serial order.
3. The marks assigned to every ques. are shown at the end every ques. in square.

Q1 ans the subsequent ques. briefly.
a) The increment operator (++) increases value by 1. Then how are (++a) and (a--) different?
b) Is it possible to pass afunction to a different function? If yes? How?
c) In what way sscanf() is various from scanf()?
d) Illustrate the purpose of typedef.
e) Compare and contrast puts() from sprint().
[5*2=10]

Q2 ans the subsequent ques..
a) what are the enum datatype? give example.
b) Write algorithm to check if number is prime or not?
c) Illustrate the purpose of #define. give example.
d) The conditional operator is similar to which condition? Illustrate with example.
e) What is return datatype of the subsequent string functions:
1) strien()
2) Stricmp()
[5*2=10]

Q3 a)Write a program to compute sum of digit using recursion.
Example:
Input: 3247
Output: 16
[1*10=10]

b)Find all logical and syntax errors in subsequent code. accurate the code and provide the output.

#include
#include
void main()
{
clrscr();
int fact,i;
scanf("%c",&n);
for(i=n;i>=1;i--)
fact=fact*1;
printf("%d',fact);
getch();
}

[1*10=10]

Q4 a) evaluate the following:
1) 16<<2
2) b=k++ - k++ - k++ + --k), where k=8
3) 6&&4
4) 3||5
5) (3&&5) || (7&&0)
[5*2=10]

b) Write a program to print the subsequent series.
*
**
***
****
*****
****
***
**
*
[1*10=10]


Q5 a) Draw flowchart to obtain even and odd numbers from 50 to 100.
[1*10=10]

b) Write a program to reverse the columns of the matrix.
Example;
Input matrix: Output matrix
one two three four four three two 1
five six seven eight eight seven six five
nine five six seven seven six five 9
[1*10=10]

Q6 a) Write a program using structures to enter the data of an employee and display the identical.
[1*8=8]

c) Write a program to display the contents of a file. The program should ask for the file
name. Also obtain the size of the file.
[1*12=12]






( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Lovely Professional University 2009 B.C.A Computer Application Basic Programming skills - Question Paper