0% found this document useful (0 votes)
40 views6 pages

PROGRAMMING IN 'C' Year 20

This document appears to be an exam paper for a Programming in C course. It contains 10 multiple choice questions in Section A testing concepts like arrays, operators, loops, functions, and pointers. Section B has longer answer questions testing topics such as loops, call by value vs reference, preprocessor directives, recursion, structures, storage classes, command line arguments, and 2D arrays. Students are instructed to attempt all questions within a 22 hour exam period for a maximum of 60 marks.

Uploaded by

leeanas9911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views6 pages

PROGRAMMING IN 'C' Year 20

This document appears to be an exam paper for a Programming in C course. It contains 10 multiple choice questions in Section A testing concepts like arrays, operators, loops, functions, and pointers. Section B has longer answer questions testing topics such as loops, call by value vs reference, preprocessor directives, recursion, structures, storage classes, command line arguments, and 2D arrays. Students are instructed to attempt all questions within a 22 hour exam period for a maximum of 60 marks.

Uploaded by

leeanas9911
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Roll No. …………………..

BCA–C-102
B. C. A. (First Semester)
EXAMINATION, 2018-19
PROGRAMMING IN „C‟
1
Time : 22 Hours
Maximum Marks : 60
Note : All questions have to attempted.
Section—A
1. Multiple Choice questions : 1 each
(a) The array int num[26] has 26 elements.
(True/False)
(b) What is compiler ?
(c) Which of the following is not a valid variable
name declaration ?
(i) int_a3;
(ii) int_3a;
(iii) int_A3;
(iv) None of the mentioned
(d) All keywords in C are in ............ .
(i) Lower Case letters
(ii) Upper Case letters
(iii) Camel Case letters
(iv) None of the mentioned
[2] BSIT–C-303

(e) What is the output of this C code ?


#include <stdio.h>
int main( )
{
int a = 1, b = 1, c;
c = a+++b;
printf(“%d, %d”, a, b);
}
(i) a = 1, b = 1
(ii) a = 2, b = 1
(iii) a = 1, b = 2
(iv) a = 2, b = 2
(f) What is the output of this C code ?
#include<stdio.h>
int main( )
{
int a = 60;
printf(“%d”, a<<2);
return(0);
}
(i) 120
(ii) 240
(iii) 480
(iv) None of these
[3] BSIT–C-303

(g) What will be the output of the following


program ?
#include<stdio.h>
#include<conio.h>
void main( )
{
int j=4;
(!j!=1?printf(“\nWelcome”):printf
(“\nGoodbye”));
getch( );
}
(h) What will be the output of the following
program ?
#include<stdio.h>
#include<conio.h>
void main( )
{
int x=10,y=20;
if(x= =y)
printf(“%d”,x,y);
getch( );
}
[4] BSIT–C-303

(i) What will be the output of the following


program ?
#include<stdio.h>
#include<conio.h>
void main( )
{
int k=35;
printf(“%d%d%d”,k= =35,k=50,k>40);
getch( );
}
(j) Elements of arrays always get stored in sequential
address space. (True/False)
(k) When a function calls itself again and again, it is
called ............. .
(l) A function with no return type is declared as
............ .

2. Explain briefly any four of the following : 3 each


(a) Differentiate between Top down and Bottom up
programming.
(b) Explain pointer to pointer.
(c) WAP to reverse a number entered by user.
(d) WAP to check number entered by user is
Armstrong or not.
(e) Explain Goto statement with an example.
[5] BSIT–C-303

Section—B
3. Attempt any two of the following : 6 each
(a) What is loop ? Elaborate different types of loops
in C with proper syntax and example.
(b) Discuss the difference between call be value and
call by reference with the help of a program.
(c) Explain preprocessor directives in C. Write down
macro definitions for the following with help of a
C program :
(i) To find area and perimeter of rectangle.
(ii) To find area and perimeter of square.
Also explain # pragma directive.
4. Attempt any two of the following : 6 each
(a) What do you understand by Recursion ? Write a
program generates the Fibonacci series for a
given number using a recursive function.
(b) Write down the difference between structure and
union with the help of example. Write a structure
definition having elements : name, rollno, class,
sex and height for 50 students.
(c) What is meant by the storage class ? Explain four
storage class specifications included in C.
5. Attempt any two of the following : 6 each
(a) What are command line arguments ? Write a
program to display number of arguments
passed.
[6] BSIT–C-303

(b) Explain the role of linker and loader in


compilation. What are the different debugging
techniques ? Explain them.

(c) What do you mean by arrays ? Explain the


representation of two-dimensional array. Write a
program to transpose a 3 × 3 matrix.

BCA–C-102 90

You might also like