+ All Categories
Home > Documents > returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow...

returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow...

Date post: 14-Mar-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
5
Chattanva Bharathl tnstitute of Technology,Hyd.075 MCA year I semester I-MID Examination—Dect2011 Subject: Computer programming and problem solving Time 10.30 am to am oate:20/t2/2011 Maxtv1arks:20 Note. Answer one question from each section. Section-A the procedure for creation and execution of c programs with the help of diagram. (b)List out various e language operators with precedence and Associativity. (3M) (c)Write a procr•rn to display the maximum, minimum and sum of the given set of numbers. (4M) (Note: Don't use arrays concept.) Ž.(ajWhat are the outputs of the following programs. (5M) int main() int main() int main() C) ( int int x; print¶ ,ð+4), Yod return O; return O; return O; tnt main() int main() Int , ' returnO, return O; et there is any syntax errors in the above code, ignore them) (b)Write a program to find out cos(x) value using series expansion. (5M) (note: input x value 'n degrees) Section-p about local and global variables with an example (2M) (b)Write a program to find out factortal of a given positive number using separate function. (4M) (c)Write a prwam to generate Fibonacci series using recursive function, (4M) (a)consider the following code.(note: ignore syntax errors) (25M) Nincludeotdioh> int x(int int matnt) { int y; return O; int x(int n) return 1; O)what is the output of the above code? (ii)How many Omes the function x will be invoked? (b)what Vðlue returned by the following function for t(16)?(note: ignore syntax errors) (25M) int t(int n) /qn«O) return 3; return 2;
Transcript
Page 1: returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow chart to find out whether the given number is prime or not. 5. a) Describe briefly

Chattanva Bharathl tnstitute of Technology,Hyd.075MCA year I semester I-MID Examination—Dect2011

Subject: Computer programming and problem solving

Time 10.30 am to am oate:20/t2/2011 Maxtv1arks:20

Note. Answer one question from each section.

Section-Athe procedure for creation and execution of c programs with the help of diagram.

(b)List out various e language operators with precedence and Associativity. (3M)(c)Write a procr•rn to display the maximum, minimum and sum of the given set of numbers. (4M)(Note: Don't use arrays concept.)Ž.(ajWhat are the outputs of the following programs. (5M)

int main() int main() int main()C) ( int int x;

print¶ ,ð+4), Yodreturn O;

return O; return O;

tnt main() int main()Int

, ' returnO, return O;

et there is any syntax errors in the above code, ignore them)(b)Write a program to find out cos(x) value using series expansion. (5M)(note: input x value 'n degrees)

Section-pabout local and global variables with an example (2M)

(b)Write a program to find out factortal of a given positive number using separate function. (4M)(c)Write a prwam to generate Fibonacci series using recursive function, (4M)

(a)consider the following code.(note: ignore syntax errors) (25M)Nincludeotdioh>int x(intint matnt)

{ int y;

return O;

int x(int n)

return 1;

O)what is the output of the above code?(ii)How many Omes the function x will be invoked?(b)what Vðlue returned by the following function for t(16)?(note: ignore syntax errors) (25M)int t(int n)

/qn«O) return 3;return 2;

Page 2: returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow chart to find out whether the given number is prime or not. 5. a) Describe briefly

(c)what are the outputs of the following programs?

int malnoint nai07.i; //assume integer is 2 bytes

return O;

int main()int

& blO);

return O;

int main(){ int

return O;

(note: syntax errors)

Paper set by: D. jayaram, Dept of MCA

Page 3: returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow chart to find out whether the given number is prime or not. 5. a) Describe briefly

Chaitanya Bharathi Institute of Technology, Gandipet, Hyd-075

MCA I year r semester I internal Examination -Dec, 2014

Subject: Computer Programming

Date: 01-12-2014 Time: 2 PM to 3 PM Marks: 20

Note 1: Answer ALL questions from part-A and TWO questions from part—B.

Note 2: Write answers to the questions as per the marks given.

Pprt-A (6 Marks)

1. List out the rules to create an identifier.

2. List out any four advantages of the functions.

3. Explain briefly about conditional compilation.

Part-B (14

4. a) Explain briefly about switch case with an example.

(2)

(2)

(2)

(4)

b) Draw a flow chart to find out whether the given number is prime or

not.

5. a) Describe briefly about the storage classes of the variables.

b) Write a C program to generate the Fibonacci series.

6. a) Write a C program to find out the grade of a student.

(Note: Assume appropriate data)

(3)

(4)

(3)

(4)

b) Write a C program to find the GCD of two positive numbers using

recursive function. (3)

Paper set by: Sri D.jayaram, Associate Professor, Dept. of MCA, CBIT.

Page 4: returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow chart to find out whether the given number is prime or not. 5. a) Describe briefly

Chaitanya Bharathi Institute of Gandipct, IIyd-075

MCA I Year f semester Il internal Examination -Feb, 2014

Subject: Computer Programming (code: MCI 12)

Date: 06-02-2014 Time: 2 PM to 3 PM Marks: 20

Note: Answer all questions from part -A and two questions from part —B.

Part-A (6 Marks)

l. Explain briefly about command line arguments.

2. What are the operations can be perform on the pointer variables?

3. Differentiate between structure and union.

Part-B (14 Marks)

4. Write a C program to implement bubble sort technique using user defined function.

5. Write a C program to count the number of characters, words and vowels in a text file.

6. Describe briefly about the following.

i) Dynamic memory management functions.

li) String manipulation functions. (Note: Any three)

Paper set by: Sri D.jayaram, Associate Professor, Dept. of MCA, CBIT.

(2)

(2)

(2)

(7)

(7)

(7)

Page 5: returnO, - Herokucbitmca.herokuapp.com/pages/Data/sem1/CPP/questions/internal.pdf · b) Draw a flow chart to find out whether the given number is prime or not. 5. a) Describe briefly

Chaitanya Bharathi Institutc of Technology, Gandipet, Hyd-075

(Autonomous)

MCA I year semester Il internal Examination -Jan, 2015

Subject: Computer Programming

Date: 21-01-2015 Time: 2 PM to 3 PM Max Marks: 20

Note 1: Answer ALL questions from part-A and TWO questions from part—B.Note 2: Write answers to the questions as per the marks given.

Part-A (6 Marks)X. Define an Array. When we need I-D and 2-1) Arrays?

-5. Explian briefly about command line arguments.

3. Define self referential structure. Give an example.

Part-B (14 Mario)

(2)

(2)

(2)

4. Write a program to implement binary search technique on the set of elements

which are sorted in descending order. (7)5, Write a program to store five students information in the structure student and

read five students information from the structure student. (7)6.a) Explain briefly about four dynamic memory management functions. (4)

b) Explain briefly about the following. (3)

1 ) strcat 2)strcpy 3)strcmp

9h3(.L9A

Paper set by: Sri D.jayaram, Associate Professor, Dept. of MCA, CBIT.


Recommended