0% found this document useful (0 votes)
6 views

Fundamental of Programming_26-12-2017

Uploaded by

Soumya Das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Fundamental of Programming_26-12-2017

Uploaded by

Soumya Das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Seat No:______________ Enrollment No:______________

PARUL UNIVERSITY
FACULTY OF IT & COMPUTER SCIENCE
BCA, Winter2017–18 Examination
Semester: 1 Date: 26-12-2017
Subject Code: 05101102 Time: 10:30AM to 01:00PM
Subject Name: Fundamentals of Programming Total Marks: 60
Instructions:
1. Figures to the right indicate full marks.
2. Make suitable assumptions wherever necessary.
3. Make suitable assumptions wherever necessary.
4. Start new question on new page.

Q.1 Answer the following.


(A) Write a short notes. (5)
1. Define Algorithm.
2. What is Local variable?
3. List out storage classes in C Programming.
4. Which Header file is required for the exit() statement?
5. Define Array.
(B) Multiple choice type questions/ Give the sentence true or false. (Each of 01 marks) (10)
1. Which of the following is not a valid variable name declaration?
A) int _a3; B)int a_3;
C) int 3_a; D) int _3a
2. The keywords cannot be used as variable names.
(A)True (B) False
3. Input/output function prototypes and macros are defined in which header file?
A) conio.h B) stdlib.h
C) stdio.h D) dos.h
4. Continue statement used for
A) To continue to the next line of code
B) To stop the current iteration and begin the next iteration from the beginning
C) To handle run time error
D)None of above
5. A zero value is considered to be false and a non-zero value is considered to be true.
(A)True (B) False
6. What will be the output?
void main ( )
{
printf(“%d”,’B’ < ‘A’ );
}
A)Declaration Error B) A
C) B D) None of these
7. What is the output of this C code?
#include <stdio.h>
int main(){
int i =10, j =3, k =3;
printf("%d %d ", i, j, k);
}
A) Compile time Error B) 10 3 3
C) 10 3 D) 10
8. Array index always start from
A) 0 B) 1
C) 2 D) 3
Page 1 of 2
9. Which of the following correctly declares an array?
A) int anarray[10]; B) int anarray;
C) anarray{10}; D) array anarray[10];
10. What is the index number of the last element of an array with 30 elements?
A) 29 B) 28
C) 0 D) Programmer-defined
Q.2 Answer the following. (Attempt any 5) (15)
1. Comparison: Break and continue.
2. Comparison: while loop and do… while loop.
3. What is Global Variable? Difference between local and global variable.
4. What is operator? Explain Bitwise operators.
5. Difference between complier and interpreter.
6. What is Algorithm? Write an algorithm for swapping of two numbers.
Q.3 Answer the following. (Attempt any 3) (15)
1 Explain in brief about structure of C programming.
2 Write a C Program to print half pyramid as using numbers as shown in figure below.
1
12
123
1234
12345
3 Write down C Program to Find Factorial of a Number using for loop with output.
4 Explain conditional statement with example.
Q.4 Answer the following.
(A) What is data type? Explain any four data types used in C language. (5)
(B) Explain two dimensional arrays with an example. Write pros and cons of array. (10)
OR
(B) Explain one dimensional array with an example. Write pros and cons of array. (10)

Page 2 of 2

You might also like