SlideShare a Scribd company logo
1 of 14
Download to read offline
1 | P a g e
Sikkim Manipal University
Model Question Paper
Subject: Computer Programming ‘C Language’ Subject code: MC 0061
Total Time: 2 hours Total Marks: 140
Notes:
1. Question paper is divided into three parts i.e. Part A, Part B, and Part C.
2. Part A consist 40 questions of 1 mark each
3. Part B consist 20 questions of 2 marks each.
4. Part C consist 15 questions of 4 marks each.
5. All questions are compulsory
Part A (One Mark Question)
1) C Program must have –
a. Start () function
b. Begin() function
c. Main() function
d. First() function
2) int a[]={5,4,3,2,1} What is the value of a[3]?
a. 2
b. 3
c. 4
d. 1
3) float a[10]; What is the size of the array?
a. 10
b. 20
c. 30
d. 40
4) In C a variable name cannot contain
a. Blank Space
b. Underscore
c. Letter
d. Digits
5) Array is :
a. Primary data type
b. Homogeneous data type
c. Pointer data type
2 | P a g e
d. Heterogeneous data type
6) Array index can be started from 1?
a. Yes
b. No
7) To accept 100 different values into the array we require:
a. Loop
b. If condition
c. Function
d. Structure
8) Which of the following is odd one out
a. +
b. –
c. /
d. **
9) Pointer holds
a. Value of variable
b. Address of variable
c. Value and address of variable
d. Always null
10) An integer constant in C must have
a. At least one digit
b. At least one decimal point
c. A comma along with digits
d. Digits separated by commas
11) Backslash character constant
a. Started with single cote
b. Started with backslash
c. Started with n
d. Non of the above
12) How many operators are there in C Language
a. 8
b. 9
c. 10
d. 7
13) How many bits are required to represent double data type in memory
a. 32
3 | P a g e
b. 16
c. 10
d. 8
14) What will be the output of the expression: Printf(“%d”, „1‟);
a. 1
b. 48
c. 49
d. 0
15) The function getchar() is used to accept
a. One character value at a time
b. Two character value at a time
c. Ten character value at a time
d. Many character value at a time
16) A structure brings together a group of
a. items of the same data type
b. related data items and variables
c. integers with user defined names
d. floating points with user defined names
17) EOF is a
a. Macro
b. Function
c. Variable
d. Constant
18) scanf() can able to accept
a. Only character types of values
b. Any types of values
c. Only numeric types of values
d. Only string types of values
19) If statement is a
a. Conditional Statement
b. Assignment Statement
c. Looping Statement
d. Arithmetic Statement
20) goto statement is only essential because
a. to exit from current loop
b. to exit from program
4 | P a g e
c. to exit from more than one loops
d. to exit from file
21) In switch statement break is used :
a. to break from loop
b. to break from case
c. to break from default case only
d. all of the above
22) do -while is the loop where
a. condition checks at end of the loop
b. condition checks at beginning of the loop
c. condition checks within the loop body
d. condition never checks
23) while is the loop where
a. condition checks at end of the loop
b. condition checks at beginning of the loop
c. condition checks within the loop body
d. condition never checks
24) for(;;)
a. it is a finite loop
b. it is a infinite loop
c. the control never enter into the loop body
d. None of the above
25) Function prototype declaration is
a. optional for good program
b. compulsory for good program
c. frequently required for good program
d. never required for good program
26) In function call by value
a. transfers value only
b. transfers both value and address
c. transfers either value or address
d. transfers none of the above
27) By default function returns is
a. float
b. integer
c. double
5 | P a g e
d. void
28) Built –in function can be used in a program
a. only one time
b. only two times
c. number of times
d. only through user defined function
29) In the recursive function
a. We are telling “what to do?”
b. We are telling “How to do?”
c. We are telling “Not to do.”
d. We are telling “Why to do?”
30) Visibility of a variable means
a. How much the capacity of the variable?
b. How much the rest of the program can access the variable?
c. How many times the variable is used?
d. How many times the value is changed?
31) The auto storage class
a. keeps value within the block
b. destroys value within the block
c. copies value to global variable
d. transfer value to the other function
32) If we include header files in the program , then
a. It compiles more number of lines
b. It compiles same number of lines
c. It complies less number of lines
d. None of the above.
33) In language C ,variable number of signature is
a. not possible
b. possible
c. possible for some special function
d. Possible for main function only
34) In language C , Array index starts with
a. -1
b. 0
c. 1
d. 2
6 | P a g e
35) For integer array, max number that can store into one cell
a. 32,768
b. 65,535
c. 100000
d. 1
36) For character array, how many character(s) can store in a single cell
a. One Character
b. Two Characters
c. More than Ten Characters
d. More than Hundred Characters
37) In case of pointer operation & is called
a. Value of
b. Address of
c. Data of
d. None of the above
38) Structure is a
a. Fundamental Data Type
b. User defined Data Type
c. Homogeneous Data Type
d. None of the above
39) To create structure we use the key word
a. str
b. struc
c. struct
d. structure
40) Dynamic memory allocation means
a. we can allocate disk memory at any time
b. We can allocate main memory at any point of time
c. We can reallocate static memory at any time
d. None of the above
7 | P a g e
Part B (Two Mark Question)
41) What will be the value of d (assume d to be a float) after the operation d=2/7.0?
a. 0
b. 0.2857140
c. 0.3343334
d. 1.0010232
42) The expression, a=30*1000+2893 ; evaluates to
a. 32768
b. – 32643
c. 113983
d. 0
43) If a in an integer variable, a=5/2; will return a value
a. 2.5
b. 3
c. 2
d. 0
44) The expression x= 4+2%-8
a. 6
b. -6
c. 0
d. 8
45) To increment the value of i by 2 only, we can‟t user the expression
a. i+=2;
b. i+++;
c. i=i+2;
d. a=i+2; i=a;
46) What will be the value of i after execution of the expression: int i=2; i+=i++ + ++i;
a. 10
b. 12
c. 16
d. 14
47) Which of the following statement is wrong
8 | P a g e
a. x+5=y;
b. x=x+5;
c. x=y;
d. x=5;
48) What is the value of the expression: A=(int)3.9 /(int)2.3
a. 2
b. 1
c. 3
d. 0
49) What will be the value of the expression: x=‟1‟+‟2‟+‟3‟; x/=3; printf(“%c”,x);
a. 2
b. 3
c. 4
d. 1
50) What will be the output of the expression: int a=2345; printf(“a=%2d”,a);
a. 2345
b. 23
c. 45
d. 0
51) What will be the output : int a, x=10,y=20; a=!(x>y)?x:y
a. 20
b. 10
c. 0
d. 1
52) What will be the output of the following expression
void main()
{
int a=1;
if(a=8)
printf(“Good”);
else if(a=1)
printf(“Fair”);
else
9 | P a g e
printf(“Bad”);
}
a. Good
b. Fair
c. Bad
d. None of the above
53) How many times the loop will execute?
for (i=100;i<=200;i++)
{ i--;}
a. 100 times
b. 200 times
c. 101 times
d. infinite number of times
54) What will be the output
void main()
{
int x=5
for(;x<=10;x++)
printf(“%5d”,x+1);
}
a. 5 6 7 8 9 10
b. 6 7 8 9 10 11
c. 5 7 9 11 13 15
d. 6 7 8 9 10 13
55) What will be the output :
void main()
{
void function(void);
function(); function(); function();
10 | P a g e
}
void function(void)
{ static int i=1;
printf(“%5d”,i++);
}
a. 3 3 3
b. 1 2 3
c. 1 1 1
d. 2 2 2
56) What will be the output
void main ()
{
char name[]=”Arindam”;
int i;
static int x=0;
while(name[x]!=‟0‟)
{
for(i=0;i<=x;i++)
printf(“%c”,name[i];)
printf(“n”);
x=i; i=0;
}
}
a. “Arindam” in Triangular Pattern
b. “Arindam” in Horizontal Linear Pattern
c. “Arindam” in Vertical Linear Pattern
d. None of the above
57) What will be the output of the program?
11 | P a g e
void main()
{
int a[5]={1,2,3,4,5},*pt;
pt=a;
pt++;
printf(“%d”,++*pt);
}
a. 2
b. 3
c. 4
d. 1
58) With a single FILE pointer how many file(s) can be opened at a time?
a. 1 Files
b. 2 Files
c. 3 Files
d. Many Files
59) Find the output
#define S(X) X*X
#define S(X) (X*X)
If X=4 then the value of S(X) will be ?
a. 16 16
b. 16 4
c. 4 16
d. 4 4
60) The expression (a+b)/3 is in
a. Infix Notation
b. Prefix Notation
c. Postfix Notation
d. Polish Notation
12 | P a g e
Part C (Four Mark Question)
61) What will the value of root
double a=2,b=2,c=2,dis=10;
dis=b*b-4*c;
root=-b-sqrt(dis)/(2*a);
a. 10
b. 0
c. Syntax error
d. Domain error
62) Determine the value of the logical expressions if a=5 ,b=10 and c= -6
(a/2.0==0.0 && b/2.0!=0.0)||c<0.0
a. 0
b. 1
c. 2
d. 3
63) What is the output of the following program?
Void main()
{
int m;
for(m=1;m<5;m++);
printf(“%dn”,(m%2)?m:m*2);
}
a. 5
b. 10
c. 0
d. 1
64) How many times the loop will execute
int a=10;
While(i<=10)
{ printf(“%d”,i++); i--; }
a. One times
b. Two times
13 | P a g e
c. Infinite number of times
d. Never enter into the loop
65) Pick up the correct answer
While(…)
{
While(…)
{
while(…)
{
Break;
}
}
}
a. It will break from current loop
b. It will break from second loop
c. It will break from all the loops
d. It will break from program
66) What is the value of x;
int a,*p;
a=10; p=&a;
x=*(&(*p))
a. 10
b. 20
c. Address of a
d. Address of p
67) What is the value of x
int a[]={5,6,7,8,0},*p;
p=a;
int x=*p++;
a. 5
b. 6
c. 7
d. 8
68) What is the value of X
14 | P a g e
Union
{
Struct student
{ int roll; }
Struct
{ float salary;}
}people;
X= sizeof(people);
a. 2
b. 3
c. 4
d. 0
69) Pick the correct answer
FILE *pt;
pt=fopen(“Filename”,”r”);
function returns pt=NULL;
a. The function cannot find the file
b. The function found the file but unable to write
c. The function found the file but unable to append
d. The function able to open the file
70) What is the value of A
#define N 10
#define N1 (R) (N*2+R)
A=N1(4)
a. It is correct and returns 20
b. It is not correct and returns error
c. It is correct and returns 24
d. It is correct and returns 25
----

More Related Content

What's hot

important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012Kishor Parkhe
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Poonam Chopra
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011Deepak Singh
 
Std 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsStd 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsNuzhat Memon
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in CSaket Pathak
 
IP Sample paper 2 Class XI
IP Sample paper 2 Class XI IP Sample paper 2 Class XI
IP Sample paper 2 Class XI Poonam Chopra
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna universitysangeethajames07
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004Rohit Garg
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manualAnil Bishnoi
 
Sample Paper Class XI (Informatics Practices)
Sample Paper Class XI (Informatics Practices)Sample Paper Class XI (Informatics Practices)
Sample Paper Class XI (Informatics Practices)Poonam Chopra
 
Cplus plus abd datastructure
Cplus plus abd datastructureCplus plus abd datastructure
Cplus plus abd datastructureprabhatjon
 
C and data structure
C and data structureC and data structure
C and data structureprabhatjon
 

What's hot (20)

important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
 
Std 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQsStd 10 chapter 11 data type, expression and operators important MCQs
Std 10 chapter 11 data type, expression and operators important MCQs
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in C
 
Core java
Core javaCore java
Core java
 
Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ  Part - 3 Cpp programming Solved MCQ
Part - 3 Cpp programming Solved MCQ
 
Revision1schema C programming
Revision1schema C programmingRevision1schema C programming
Revision1schema C programming
 
IP Sample paper 2 Class XI
IP Sample paper 2 Class XI IP Sample paper 2 Class XI
IP Sample paper 2 Class XI
 
Exam for c
Exam for cExam for c
Exam for c
 
C questions
C questionsC questions
C questions
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna university
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
Sample Paper Class XI (Informatics Practices)
Sample Paper Class XI (Informatics Practices)Sample Paper Class XI (Informatics Practices)
Sample Paper Class XI (Informatics Practices)
 
Cplus plus abd datastructure
Cplus plus abd datastructureCplus plus abd datastructure
Cplus plus abd datastructure
 
C and data structure
C and data structureC and data structure
C and data structure
 

Viewers also liked

Edu+Presentation
Edu+PresentationEdu+Presentation
Edu+Presentationgurbaxrawat
 
ปร บเง นเด_อน __หล_งปร_บ __
ปร บเง นเด_อน __หล_งปร_บ __ปร บเง นเด_อน __หล_งปร_บ __
ปร บเง นเด_อน __หล_งปร_บ __Little Bee
 
Ariston hobs
Ariston hobsAriston hobs
Ariston hobslmagus
 
Platform 4 work programme for the civil society forum 2 ukrainian
Platform 4 work programme for the civil society forum 2   ukrainianPlatform 4 work programme for the civil society forum 2   ukrainian
Platform 4 work programme for the civil society forum 2 ukrainianProstirUA
 
Pre interm I, profe Cintia (teens)
Pre interm I, profe Cintia (teens)Pre interm I, profe Cintia (teens)
Pre interm I, profe Cintia (teens)Maria Segato
 
Dot+Net+2010+Features
Dot+Net+2010+FeaturesDot+Net+2010+Features
Dot+Net+2010+Featuresgurbaxrawat
 
Sistem penomboran mte3101
Sistem penomboran   mte3101Sistem penomboran   mte3101
Sistem penomboran mte3101Ifrahim jamil
 
Московкина Нина.Оценка и развитие персонала
Московкина Нина.Оценка и развитие персоналаМосковкина Нина.Оценка и развитие персонала
Московкина Нина.Оценка и развитие персоналаБурнаев Михаил
 

Viewers also liked (13)

Edu+Presentation
Edu+PresentationEdu+Presentation
Edu+Presentation
 
Health+PPPPPP
Health+PPPPPPHealth+PPPPPP
Health+PPPPPP
 
Business.......
Business.......Business.......
Business.......
 
Techno+......
Techno+......Techno+......
Techno+......
 
ปร บเง นเด_อน __หล_งปร_บ __
ปร บเง นเด_อน __หล_งปร_บ __ปร บเง นเด_อน __หล_งปร_บ __
ปร บเง นเด_อน __หล_งปร_บ __
 
Ariston hobs
Ariston hobsAriston hobs
Ariston hobs
 
Topclub karaoke
Topclub karaokeTopclub karaoke
Topclub karaoke
 
Platform 4 work programme for the civil society forum 2 ukrainian
Platform 4 work programme for the civil society forum 2   ukrainianPlatform 4 work programme for the civil society forum 2   ukrainian
Platform 4 work programme for the civil society forum 2 ukrainian
 
Pre interm I, profe Cintia (teens)
Pre interm I, profe Cintia (teens)Pre interm I, profe Cintia (teens)
Pre interm I, profe Cintia (teens)
 
Brand utility
Brand utilityBrand utility
Brand utility
 
Dot+Net+2010+Features
Dot+Net+2010+FeaturesDot+Net+2010+Features
Dot+Net+2010+Features
 
Sistem penomboran mte3101
Sistem penomboran   mte3101Sistem penomboran   mte3101
Sistem penomboran mte3101
 
Московкина Нина.Оценка и развитие персонала
Московкина Нина.Оценка и развитие персоналаМосковкина Нина.Оценка и развитие персонала
Московкина Нина.Оценка и развитие персонала
 

Similar to Model question paper_mc0061

this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentspavan81088
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2Knowledge Center Computer
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqssaadkhan672
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfVedant Gavhane
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxgitagrimston
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfahmed8651
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1 UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1 Knowledge Center Computer
 
Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsNuzhat Memon
 
C programming & data structure
C programming & data structureC programming & data structure
C programming & data structurerajeev_123
 
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice PaperCAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice PaperAlex Stewart
 
Java Questioner for
Java Questioner for Java Questioner for
Java Questioner for Abhay Korat
 
C mcq practice test 4
C mcq practice test 4C mcq practice test 4
C mcq practice test 4Aman Kamboj
 
Java questions1
Java questions1Java questions1
Java questions1yash4884
 
Ramco Sample Paper 2003
Ramco  Sample  Paper 2003Ramco  Sample  Paper 2003
Ramco Sample Paper 2003ncct
 
New microsoft office word document (3)
New microsoft office word document (3)New microsoft office word document (3)
New microsoft office word document (3)Sagar Kuchekar
 

Similar to Model question paper_mc0061 (20)

this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming studentsthis pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming students
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Computer programming mcqs
Computer programming mcqsComputer programming mcqs
Computer programming mcqs
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
 
C Programming
C ProgrammingC Programming
C Programming
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docx
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdf
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1 UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 1
 
Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQs
 
C programming & data structure
C programming & data structureC programming & data structure
C programming & data structure
 
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice PaperCAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
 
Java Questioner for
Java Questioner for Java Questioner for
Java Questioner for
 
C mcq practice test 4
C mcq practice test 4C mcq practice test 4
C mcq practice test 4
 
Java questions1
Java questions1Java questions1
Java questions1
 
Ramco Sample Paper 2003
Ramco  Sample  Paper 2003Ramco  Sample  Paper 2003
Ramco Sample Paper 2003
 
Soln dc05
Soln dc05Soln dc05
Soln dc05
 
New microsoft office word document (3)
New microsoft office word document (3)New microsoft office word document (3)
New microsoft office word document (3)
 
C test
C testC test
C test
 

Recently uploaded

Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 

Recently uploaded (20)

Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 

Model question paper_mc0061

  • 1. 1 | P a g e Sikkim Manipal University Model Question Paper Subject: Computer Programming ‘C Language’ Subject code: MC 0061 Total Time: 2 hours Total Marks: 140 Notes: 1. Question paper is divided into three parts i.e. Part A, Part B, and Part C. 2. Part A consist 40 questions of 1 mark each 3. Part B consist 20 questions of 2 marks each. 4. Part C consist 15 questions of 4 marks each. 5. All questions are compulsory Part A (One Mark Question) 1) C Program must have – a. Start () function b. Begin() function c. Main() function d. First() function 2) int a[]={5,4,3,2,1} What is the value of a[3]? a. 2 b. 3 c. 4 d. 1 3) float a[10]; What is the size of the array? a. 10 b. 20 c. 30 d. 40 4) In C a variable name cannot contain a. Blank Space b. Underscore c. Letter d. Digits 5) Array is : a. Primary data type b. Homogeneous data type c. Pointer data type
  • 2. 2 | P a g e d. Heterogeneous data type 6) Array index can be started from 1? a. Yes b. No 7) To accept 100 different values into the array we require: a. Loop b. If condition c. Function d. Structure 8) Which of the following is odd one out a. + b. – c. / d. ** 9) Pointer holds a. Value of variable b. Address of variable c. Value and address of variable d. Always null 10) An integer constant in C must have a. At least one digit b. At least one decimal point c. A comma along with digits d. Digits separated by commas 11) Backslash character constant a. Started with single cote b. Started with backslash c. Started with n d. Non of the above 12) How many operators are there in C Language a. 8 b. 9 c. 10 d. 7 13) How many bits are required to represent double data type in memory a. 32
  • 3. 3 | P a g e b. 16 c. 10 d. 8 14) What will be the output of the expression: Printf(“%d”, „1‟); a. 1 b. 48 c. 49 d. 0 15) The function getchar() is used to accept a. One character value at a time b. Two character value at a time c. Ten character value at a time d. Many character value at a time 16) A structure brings together a group of a. items of the same data type b. related data items and variables c. integers with user defined names d. floating points with user defined names 17) EOF is a a. Macro b. Function c. Variable d. Constant 18) scanf() can able to accept a. Only character types of values b. Any types of values c. Only numeric types of values d. Only string types of values 19) If statement is a a. Conditional Statement b. Assignment Statement c. Looping Statement d. Arithmetic Statement 20) goto statement is only essential because a. to exit from current loop b. to exit from program
  • 4. 4 | P a g e c. to exit from more than one loops d. to exit from file 21) In switch statement break is used : a. to break from loop b. to break from case c. to break from default case only d. all of the above 22) do -while is the loop where a. condition checks at end of the loop b. condition checks at beginning of the loop c. condition checks within the loop body d. condition never checks 23) while is the loop where a. condition checks at end of the loop b. condition checks at beginning of the loop c. condition checks within the loop body d. condition never checks 24) for(;;) a. it is a finite loop b. it is a infinite loop c. the control never enter into the loop body d. None of the above 25) Function prototype declaration is a. optional for good program b. compulsory for good program c. frequently required for good program d. never required for good program 26) In function call by value a. transfers value only b. transfers both value and address c. transfers either value or address d. transfers none of the above 27) By default function returns is a. float b. integer c. double
  • 5. 5 | P a g e d. void 28) Built –in function can be used in a program a. only one time b. only two times c. number of times d. only through user defined function 29) In the recursive function a. We are telling “what to do?” b. We are telling “How to do?” c. We are telling “Not to do.” d. We are telling “Why to do?” 30) Visibility of a variable means a. How much the capacity of the variable? b. How much the rest of the program can access the variable? c. How many times the variable is used? d. How many times the value is changed? 31) The auto storage class a. keeps value within the block b. destroys value within the block c. copies value to global variable d. transfer value to the other function 32) If we include header files in the program , then a. It compiles more number of lines b. It compiles same number of lines c. It complies less number of lines d. None of the above. 33) In language C ,variable number of signature is a. not possible b. possible c. possible for some special function d. Possible for main function only 34) In language C , Array index starts with a. -1 b. 0 c. 1 d. 2
  • 6. 6 | P a g e 35) For integer array, max number that can store into one cell a. 32,768 b. 65,535 c. 100000 d. 1 36) For character array, how many character(s) can store in a single cell a. One Character b. Two Characters c. More than Ten Characters d. More than Hundred Characters 37) In case of pointer operation & is called a. Value of b. Address of c. Data of d. None of the above 38) Structure is a a. Fundamental Data Type b. User defined Data Type c. Homogeneous Data Type d. None of the above 39) To create structure we use the key word a. str b. struc c. struct d. structure 40) Dynamic memory allocation means a. we can allocate disk memory at any time b. We can allocate main memory at any point of time c. We can reallocate static memory at any time d. None of the above
  • 7. 7 | P a g e Part B (Two Mark Question) 41) What will be the value of d (assume d to be a float) after the operation d=2/7.0? a. 0 b. 0.2857140 c. 0.3343334 d. 1.0010232 42) The expression, a=30*1000+2893 ; evaluates to a. 32768 b. – 32643 c. 113983 d. 0 43) If a in an integer variable, a=5/2; will return a value a. 2.5 b. 3 c. 2 d. 0 44) The expression x= 4+2%-8 a. 6 b. -6 c. 0 d. 8 45) To increment the value of i by 2 only, we can‟t user the expression a. i+=2; b. i+++; c. i=i+2; d. a=i+2; i=a; 46) What will be the value of i after execution of the expression: int i=2; i+=i++ + ++i; a. 10 b. 12 c. 16 d. 14 47) Which of the following statement is wrong
  • 8. 8 | P a g e a. x+5=y; b. x=x+5; c. x=y; d. x=5; 48) What is the value of the expression: A=(int)3.9 /(int)2.3 a. 2 b. 1 c. 3 d. 0 49) What will be the value of the expression: x=‟1‟+‟2‟+‟3‟; x/=3; printf(“%c”,x); a. 2 b. 3 c. 4 d. 1 50) What will be the output of the expression: int a=2345; printf(“a=%2d”,a); a. 2345 b. 23 c. 45 d. 0 51) What will be the output : int a, x=10,y=20; a=!(x>y)?x:y a. 20 b. 10 c. 0 d. 1 52) What will be the output of the following expression void main() { int a=1; if(a=8) printf(“Good”); else if(a=1) printf(“Fair”); else
  • 9. 9 | P a g e printf(“Bad”); } a. Good b. Fair c. Bad d. None of the above 53) How many times the loop will execute? for (i=100;i<=200;i++) { i--;} a. 100 times b. 200 times c. 101 times d. infinite number of times 54) What will be the output void main() { int x=5 for(;x<=10;x++) printf(“%5d”,x+1); } a. 5 6 7 8 9 10 b. 6 7 8 9 10 11 c. 5 7 9 11 13 15 d. 6 7 8 9 10 13 55) What will be the output : void main() { void function(void); function(); function(); function();
  • 10. 10 | P a g e } void function(void) { static int i=1; printf(“%5d”,i++); } a. 3 3 3 b. 1 2 3 c. 1 1 1 d. 2 2 2 56) What will be the output void main () { char name[]=”Arindam”; int i; static int x=0; while(name[x]!=‟0‟) { for(i=0;i<=x;i++) printf(“%c”,name[i];) printf(“n”); x=i; i=0; } } a. “Arindam” in Triangular Pattern b. “Arindam” in Horizontal Linear Pattern c. “Arindam” in Vertical Linear Pattern d. None of the above 57) What will be the output of the program?
  • 11. 11 | P a g e void main() { int a[5]={1,2,3,4,5},*pt; pt=a; pt++; printf(“%d”,++*pt); } a. 2 b. 3 c. 4 d. 1 58) With a single FILE pointer how many file(s) can be opened at a time? a. 1 Files b. 2 Files c. 3 Files d. Many Files 59) Find the output #define S(X) X*X #define S(X) (X*X) If X=4 then the value of S(X) will be ? a. 16 16 b. 16 4 c. 4 16 d. 4 4 60) The expression (a+b)/3 is in a. Infix Notation b. Prefix Notation c. Postfix Notation d. Polish Notation
  • 12. 12 | P a g e Part C (Four Mark Question) 61) What will the value of root double a=2,b=2,c=2,dis=10; dis=b*b-4*c; root=-b-sqrt(dis)/(2*a); a. 10 b. 0 c. Syntax error d. Domain error 62) Determine the value of the logical expressions if a=5 ,b=10 and c= -6 (a/2.0==0.0 && b/2.0!=0.0)||c<0.0 a. 0 b. 1 c. 2 d. 3 63) What is the output of the following program? Void main() { int m; for(m=1;m<5;m++); printf(“%dn”,(m%2)?m:m*2); } a. 5 b. 10 c. 0 d. 1 64) How many times the loop will execute int a=10; While(i<=10) { printf(“%d”,i++); i--; } a. One times b. Two times
  • 13. 13 | P a g e c. Infinite number of times d. Never enter into the loop 65) Pick up the correct answer While(…) { While(…) { while(…) { Break; } } } a. It will break from current loop b. It will break from second loop c. It will break from all the loops d. It will break from program 66) What is the value of x; int a,*p; a=10; p=&a; x=*(&(*p)) a. 10 b. 20 c. Address of a d. Address of p 67) What is the value of x int a[]={5,6,7,8,0},*p; p=a; int x=*p++; a. 5 b. 6 c. 7 d. 8 68) What is the value of X
  • 14. 14 | P a g e Union { Struct student { int roll; } Struct { float salary;} }people; X= sizeof(people); a. 2 b. 3 c. 4 d. 0 69) Pick the correct answer FILE *pt; pt=fopen(“Filename”,”r”); function returns pt=NULL; a. The function cannot find the file b. The function found the file but unable to write c. The function found the file but unable to append d. The function able to open the file 70) What is the value of A #define N 10 #define N1 (R) (N*2+R) A=N1(4) a. It is correct and returns 20 b. It is not correct and returns error c. It is correct and returns 24 d. It is correct and returns 25 ----