Exam Details
Subject | programming using - c | |
Paper | ||
Exam / Course | m.c.a.science | |
Department | ||
Organization | solapur university | |
Position | ||
Exam Date | March, 2018 | |
City, State | maharashtra, solapur |
Question Paper
M.C.A. (Semester (CBCS) Examination Mar/Apr-2018
Science
PROGRAMMING USING C
Time: 2½ Hours
Max. Marks: 70
Instructions: Question No. 1 and 2 are compulsory. Attempt any 3 questions from Q. no. 3 to Q. no. 7. Figures to the right indicate full marks.
Q.1
Choose correct alternatives.
10
Reusability of code in C is supported by
Functions
Macros
Pointers
Files
What is the output of the following program?
#include <stdio.h> void main() float a b int c a printf("%d",
2.5
Compiler error
1
2
The statement
char ch would store in ch
The character Z
ASCII value of Z
Z along with the single inverted commas
Both a and b
If a is an integer variable, a 5 will return a value
2.5
3
2
0
Consider the declaration,
int i This declaration tells the C compiler to
Reserve space in memory to hold the integer value.
Associate the name i with this memory location.
Store the value 3 at this location.
All of these c
Function declaration specifies
Function name
The return type of the function
The types of parameters it accepts
All c
A float occupies in memory
4 bits
2 bytes
32 bits
16 bits
Page 2 of 2
SLR-SQ-2
Which of the following is not the storage class in C
Register
Static
Recursion
External
Which of the following is not feature of a variable defined to have an automatic storage class?
Storage CPU registers.
Default initial value An unpredictable value
Scope Local to the block in which the variable is defined.
Life Till the control remains within the block in which the variable is defined.
10) All macro substitutions in a program are done
Before compilation of the program
After compilation
During execution
None of these
State whether following statements are True or False
04
is a binary operator, whereas, is a unary operator.
The three types of loops available in C are for, while, and switch.
In switch statement multiple cases can use same expression.
There is no limit on the number of functions that might be present in a C program.
Q.2
Write short notes on the following.
08
Algorithm
Increment and Decrement operators.
Explain the following terms.
06
Draw a flow chart to check whether the number is even or odd.
Describe the ternary operator.
Q.3
Answer the following
If the ages of Ram, Shyam and Ajay are input through the keyboard, write a program to determine the youngest of the three.
08
Explain switch statement.
06
Q.4
Answer the following
Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
08
Explain the difference between the parameter passing mechanism "call by value" and "call by reference". Which is more efficient?
06
Q.5
Answer the following.
What is a pointer? What are the advantages of using pointer? Explain pointer to array with example.
08
What are preprocessor directives?
06
Q.6
Answer the following.
Write a program to read data from keyboard, write it to a file called INPUT, and read the same data from the INPUT file and display it on the screen.
08
Explain the different kinds of loops available in C with example.
06
Q.7
Answer the following.
What does a storage class mean? Mention different storage classes available in C
08
How do you pass parameters to main() function?
06
Science
PROGRAMMING USING C
Time: 2½ Hours
Max. Marks: 70
Instructions: Question No. 1 and 2 are compulsory. Attempt any 3 questions from Q. no. 3 to Q. no. 7. Figures to the right indicate full marks.
Q.1
Choose correct alternatives.
10
Reusability of code in C is supported by
Functions
Macros
Pointers
Files
What is the output of the following program?
#include <stdio.h> void main() float a b int c a printf("%d",
2.5
Compiler error
1
2
The statement
char ch would store in ch
The character Z
ASCII value of Z
Z along with the single inverted commas
Both a and b
If a is an integer variable, a 5 will return a value
2.5
3
2
0
Consider the declaration,
int i This declaration tells the C compiler to
Reserve space in memory to hold the integer value.
Associate the name i with this memory location.
Store the value 3 at this location.
All of these c
Function declaration specifies
Function name
The return type of the function
The types of parameters it accepts
All c
A float occupies in memory
4 bits
2 bytes
32 bits
16 bits
Page 2 of 2
SLR-SQ-2
Which of the following is not the storage class in C
Register
Static
Recursion
External
Which of the following is not feature of a variable defined to have an automatic storage class?
Storage CPU registers.
Default initial value An unpredictable value
Scope Local to the block in which the variable is defined.
Life Till the control remains within the block in which the variable is defined.
10) All macro substitutions in a program are done
Before compilation of the program
After compilation
During execution
None of these
State whether following statements are True or False
04
is a binary operator, whereas, is a unary operator.
The three types of loops available in C are for, while, and switch.
In switch statement multiple cases can use same expression.
There is no limit on the number of functions that might be present in a C program.
Q.2
Write short notes on the following.
08
Algorithm
Increment and Decrement operators.
Explain the following terms.
06
Draw a flow chart to check whether the number is even or odd.
Describe the ternary operator.
Q.3
Answer the following
If the ages of Ram, Shyam and Ajay are input through the keyboard, write a program to determine the youngest of the three.
08
Explain switch statement.
06
Q.4
Answer the following
Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
08
Explain the difference between the parameter passing mechanism "call by value" and "call by reference". Which is more efficient?
06
Q.5
Answer the following.
What is a pointer? What are the advantages of using pointer? Explain pointer to array with example.
08
What are preprocessor directives?
06
Q.6
Answer the following.
Write a program to read data from keyboard, write it to a file called INPUT, and read the same data from the INPUT file and display it on the screen.
08
Explain the different kinds of loops available in C with example.
06
Q.7
Answer the following.
What does a storage class mean? Mention different storage classes available in C
08
How do you pass parameters to main() function?
06
Other Question Papers
Subjects
- .net
- artificial intelligence
- computer communication network
- computer graphics
- computer oriented statistics
- data mining and warehouse
- data structures
- database management system
- digital circuits and microprocessors
- digital image processing
- discrete mathematical structures
- distributed operating system
- finite automata
- introduction to computers
- java programming
- management
- mobile computing
- network security
- numerical analysis
- object oriented programming using c++
- opeartions research
- operating system
- pattern recognition mobile computing
- programming using - c
- programming with php
- software engineering
- system software
- uml
- web design techniques
- web technology