All posts from

CS408 Introduction to Programming B.Tech Question Paper : wbut.ac.in

Name of the University : West Bengal University of Technology
Department : Biomedical Engineering
Degree : B.Tech
Sem : IV
Subject Code/Name : CS408/Introduction To Programming
Website : wbut.ac.in
Document Type : Previous Year Examination Question Paper

Download Model/Sample Question Paper :
2009 : https://www.pdfquestion.in/uploads/qpaper.wbut.ac.in/6504-2009CS-408(1).pdf
2010 : https://www.pdfquestion.in/uploads/qpaper.wbut.ac.in/6504-2010CS-408.pdf
2011: https://www.pdfquestion.in/uploads/qpaper.wbut.ac.in/6504-2011CS-408(2).pdf
2012 : https://www.pdfquestion.in/uploads/qpaper.wbut.ac.in/6504-2012CS-408-(4417)-Obj..pdf

Introduction To Programming Question Paper

Time Allotted : 3 Hours
Full Marks : 70
** The figures in the margin indicate full marks.
** Candidates are required to give their answers in their own words as far as practicable.

Related : West Bengal University of Technology BME403 Biophysics B.Tech Question Paper : www.pdfquestion.in/6501.html

GROUP – A : ( Multiple Choice Type Questions )
1. Choose the correct alternatives for the following : 10 × 1 = 10
i) What would be the output of the following ?
#include <stdio.h>
main()
{
int x, y, z;
z = (x=6, y=2, x+y);
printf (‘‘z = %d, z);
}
a) z = 5 b) z = 3
c) z = 8 d) z = 1.


ii) main()
{
float sum = 4·4, s;
s = sizeof(sum);
printf(‘‘%f’’, s);
}
a) 1 b) 2
c) 4 d) 8.
iii) main()
{
int a = 4;
a = mul(a = mul(a = mul(a)));
printf(‘‘a = %d\n’’, a );
}
int mul(int b)
{
return (b*2);
}
a) 8 b) 16
c) 32 d) 64.

iv) The no. of bytes reserved for long int is
a) 4 b) 8
c) 2 d) 10.

v) The statement used to exit form the loop
a) Break
b) Exit
c) Continue
d) Goto.

vi) How many maximum no. of values stored in a [20][10] ?
a) 50 b) 100
c) 150 d) 200.

vii) All members of class are be default
a) public
b) private
c) protected
d) both (a) and (b).

viii) Example of pointer to a pointer is
a) &a b) *a
c) **a d) – >a.

ix) Example of derived data type in c is
a) array
b) enum
c) typedef
d) none of these.

x) Function used for inheritance in C++ is
a) Virtual function
b) Inline function
c) Friend function
d) Constructor.

GROUP – B : ( Short Answer Type Questions )
Answer any three of the following. 3 × 5 = 15
2. Write down the user defined data types and derived data types in C. Give an example of typed data type. 1
3. What is structure ? Write a program for finding the maximum wages and name of the employee. Use dynamic memory allocation. 1 + 4
4. Write down the difference between entry control loop and exit control loop. Give example of exit control loop. What is odd loop ? 2 + 2 + 1
5. Write a program of passing address to a function. 5
6. What is recursion ? Write down a program for implementing fibonacci series by using recursion technique. 1 + 4

GROUP – C : ( Long Answer Type Questions )
Answer any three of the following. 3 × 15 = 45
7. a) Writer down the advantages of using User defined functions.
b) Give an example of friend function.
c) Differentiate class and object.
d) Write down a program in C for converting the binary number into decimal number. 2 + 5 + 3 + 5

8. a) Write down the three basic features of object oriented programming. Discuss each of them briefly.
b) What is the need for OOP over Structured programming ?
c) Write the difference between structure and class.
d) Write a program in C++ for matrix addition using operator overloading. 5 + 3 + 2 + 5

9. a) What is inheritance in OOP ?
b) Write down different types of inheritance.
c) Give an example of multilevel inheritance.
d) Discuss operator overloading with suitable example. 1 + 4 + 5 + 5

10. Write short notes on any three of the following : 3 × 5
a) Inline Function.
b) Friend Function.
c) Virtual Function.
d) Data hiding.
e) Destructor.

11. a) Discuss the visibility of public, private and protected members.
b) What is
i) Automatic Variable
ii) Static Variable
iii) External Variable
iv) Register Variable ? 3 + 12

Introduction To Programming – 2011 :
Time Allotted : 3 Hours
Full Marks : 70
** The figures in the margin indicate full marks.
** Candidates are required to give their answers in their own words as far as practicable.

GROUP – A : ( Objective Type Questions )
1. Answer the following questions : 10 × 1 = 10
i) What is macro ?
ii) What is void pointer ?
iii) Instruction block in a do-while loop is executed………. times. ( Fill in the blank )
iv) What is odd loop ?
v) What is stack overflow ?

vi) The statement used to take control to the beginning of the loop is
a) break b) exit
c) continue d) none of these.

vii) If a is an integer variable, 2 a = 5 will return the value of a as
a) 2·5 b) 5
c) 2 d) 0.

viii) The number of bytes reserved for the declaration int a [ 20 ] [ 10 ] is
a) 200 b) 10
c) 20 d) none of these.

ix) What would be the output of the following ? main ( )
{ int i = – 3, j = – 2, k = – 1, x ;
x = ++ k && ++ j && ++ i ;
printf ( “%d %d %d %d”, x, i, j, k ) ;
}
a) 0 –2 –1 0 b) 1 –2 –1 0
c) 0 –3 –2 –1 d) none of these.

x) What would be the output of the following ?
main ( )
{
if ( 0 )
printf ( “False” );
else
printf ( “True” ) ;
}
a) false b) true
c) infinite loop d) none of these.

GROUP – B : ( Short Answer Type Questions )
Answer any three of the following. 3 × 5 = 15
2. What is the difference between structures and unions ?
3. Write a program in C to convert a decimal number into itshexadecimal counterpart.
4. Explain call by value and call by reference parameter passing with example.
5. Explain precedence and associativity of operators with suitable example.
6. What are the different types of overloading in object oriented programming ?

Leave a Reply

How to add comment : 1) Type your comment below. 2) Type your name. 3) Post comment.

www.pdfquestion.in © 2021

Contact Us   Privacy Policy   SiteMap