# C mcq test 4

50 %
50 %
Information about C mcq test 4
Education

Published on March 14, 2014

Author: amankamboj10004

Source: slideshare.net

## Description

c,c++, programming,mcq,multiple choice question

For more MCQ Question visit www.csemcq.com Q1. If an integer need 2 bytes of storage then the maximum value of an signed integer is: a) 216 -1 b) 215 -1 c) 216 d) 215 Ans b Explanation: In signed magnitude form one bit is used to store the sign so only 15 bits are available to store the value. Q2. If cse is an input then the following program fragment results in Char x,y,z; Printf(“%d”,scanf(“%c”, “%c”, “%c”,&x,&y,&z)); results in a) Syntax error b) A fatal error c) Segmentation violation d) Printing of 3 Ans d Explanation: Scanf() function returns number of successful matches I.e. 3 in this case Q3 The statement printf(“%d”,sizeof(“”)); prints a) An error message b) 0 c) garbage d) 1 Ans d Q4 The following program fragment: if (a=5) printf(“a is five”); else printf(“a is not five”); result in the printing of a) a is five b) a is not five c) nothing d) garbage ans a q5 main()

For more MCQ Question visit www.csemcq.com { Int i=5; i=(++i)/(i++); printf(“%d”,i); } prints: a) 2 b) 5 c) 1 d) 6 Ans a Q6 The statement printf(“%d”,10?0?5:11:12); prints: a) 10 b) 0 c) 12 d) 11 Ans d Q7 if you are using “open” function for opening a file the file handle should be of--------type a)FILE b) int c) char d)none of the above ans a; Q8 What will be the output of following program: #define ISLOWER(a)(a>=97&&a<=127) #define TOUPPER(a)(a=a-32) int main() { char ch=’c’; if(ISLOWER(ch)) ch=TOUPPER(ch); printf(“%c”,ch); } Ans a)C b)c c)99 d) None of the above Q9. Find the output of program: int main() { int i;

For more MCQ Question visit www.csemcq.com for(i=-1;i<=10;i++) { if(i<5) continue; else break; printf("gets printed only once"); } } Ans a)No output b) Gets Printed only once c)Error d) None Q10 Find the output of program: int main() { if(printf("C for yourself how it worksn")) getch(); } a) Error b) C for yourself how it works c) none e) C for yourself how it works C for yourself how it works C for yourself how it works C for yourself how it works ---------------------------------- Ans b

## Add a comment

 User name: Comment:

## Related pages

### MCQ Test: C MCQ Test - 4

Que.8. Which of the following statement is correct prototype of the malloc() function in c ?

### C mcq test 4 - Education - documents

The document was removed. Please view another documents 1 × Close Share C mcq test 4

### MCQ Test - facebook.com

MCQ Test @itmcqtest. Public Cancel Save Changes. See more of MCQ Test by logging into Facebook. Message this Page, learn about upcoming events and more.

### C mcq test 4 - Education - docslide.us

c,c++, programming,mcq,multiple choice question. Download C mcq test 4. Transcript

### MCQ Test

MCQ Test Wednesday, December 18, 2013. Computer Basics MCQ Test – 4. Que.1. ... C: Vertical and horizontal lines of resolution. D: ...

### B.C.S exam & MCQ Test - facebook.com

B.C.S exam & MCQ Test. 4,784 likes · 114 talking about this. Only official page of BCS exam..

### Biosphere MCQs - Multiple Choice Questions - GK Test 4

Learn MCQs on biosphere test online, GK multiple choice questions, learning test MCQ on introduction to biosphere as life created from non-living matter is ...

### Computer Arithmetic MCQs - Multiple Choice Questions - CA ...

Learn MCQs on computer arithmetic test online, CA multiple choice questions, learning test MCQ on addition and subtraction as mips architecture detects ...