Multiple Choice Questions ( 1 mark)

Similar documents
B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

Strings and Library Functions

Chapter 1 Getting Started Structured Programming 1

C Programming Multiple. Choice

Questions Bank. 14) State any four advantages of using flow-chart

IECD Institute for Entrepreneurship and Career Development Bharathidasan University, Tiruchirappalli 23.

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University

Fundamentals of Computer Programming Using C

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath

Q1. Multiple Choice Questions


AIR FORCE SCHOOL,BAMRAULI COMPUTER SCIENCE (083) CLASS XI Split up Syllabus (Session ) Contents

Characters in C consist of any printable or nonprintable character in the computer s character set including lowercase letters, uppercase letters,

C-LANGUAGE CURRICULAM

Split up Syllabus (Session )

PES INSTITUTE OF TECHNOLOGY (BSC) I MCA, First IA Test, November 2015 Programming Using C (13MCA11) Solution Set Faculty: Jeny Jijo

Scheme G. Sample Test Paper-I. Course Name : Computer Engineering Group Course Code : CO/CD/CM/CW/IF Semester : Second Subject Tile : Programming in C

Computers Programming Course 6. Iulian Năstac

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

Computers Programming Course 5. Iulian Năstac

Contents. A Review of C language. Visual C Visual C++ 6.0

Fundamental Data Types. CSE 130: Introduction to Programming in C Stony Brook University

A function is a named group of statements developed to solve a sub-problem and returns a value to other functions when it is called.

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

Question Bank (SPA SEM II)

3. Functions. Modular programming is the dividing of the entire problem into small sub problems that can be solved by writing separate programs.

Computer Programming. C Array is a collection of data belongings to the same data type. data_type array_name[array_size];

Model Viva Questions for Programming in C lab

It is necessary to have a single function main in every C program, along with other functions used/defined by the programmer.

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

ONE DIMENSIONAL ARRAYS

ARRAYS(II Unit Part II)

ADARSH VIDYA KENDRA NAGERCOIL COMPUTER SCIENCE. Grade: IX C++ PROGRAMMING. Department of Computer Science 1

Computer Programming 5th Week loops (do-while, for), Arrays, array operations, C libraries


CCE RR REVISED & UN-REVISED KARNATAKA SECONDARY EDUCATION EXAMINATION BOARD, MALLESWARAM, BANGALORE G È.G È.G È..

The Hyderabad Public School, Begumpet, Hyderabad, A.P

M1-R4: Programing and Problem Solving using C (JULY 2018)

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

UNIT-I Input/ Output functions and other library functions

Unit 4. Input/Output Functions

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

Basics of Programming

COMPUTER SCIENCE HIGHER SECONDARY FIRST YEAR. VOLUME II - CHAPTER 10 PROBLEM SOLVING TECHNIQUES AND C PROGRAMMING 1,2,3 & 5 MARKS

C programming basics T3-1 -

Intermediate Programming, Spring 2017*

ANSI C Programming Simple Programs

Introduction to string

today cs3157-fall2002-sklar-lect05 1

UNIT IV INTRODUCTION TO C

Subject: Fundamental of Computer Programming 2068

OBJECTIVE QUESTIONS: Choose the correct alternative:

Computer Language. It is a systematical code for communication between System and user. This is in two categories.

Lecture 3. Review. CS 141 Lecture 3 By Ziad Kobti -Control Structures Examples -Built-in functions. Conditions: Loops: if( ) / else switch

I BCA[ ] SEMESTER I CORE: C PROGRAMMING - 106A Multiple Choice Questions.

Introduction to C Language

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

(i) Describe in detail about the classification of computers with their features and limitations(10)

Euclid s algorithm, 133

LESSON 4. The DATA TYPE char

Chapter 8 - Characters and Strings

PROGRAMMING IN C AND C++:

Technical Questions. Q 1) What are the key features in C programming language?

b) Give the output of the following program: 6,70,70 2,70 210,282,59290

P.E.S. INSTITUTE OF TECHNOLOGY BANGALORE SOUTH CAMPUS 1 ST INTERNAL ASSESMENT TEST (SCEME AND SOLUTIONS)

Programming in C. Part 1: Introduction

ME 172. Lecture 2. Data Types and Modifier 3/7/2011. variables scanf() printf() Basic data types are. Modifiers. char int float double

Chapter 8 C Characters and Strings

Arrays, Strings, & Pointers

6.096 Introduction to C++ January (IAP) 2009

UNIT IV 2 MARKS. ( Word to PDF Converter - Unregistered ) FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING

Dept. of CSE, IIT KGP

Downloaded from

CSCI 171 Chapter Outlines

'C' Programming Language

Unit 3 Decision making, Looping and Arrays

(2½ Hours) [Total Marks: 75

Tutorial No. 2 - Solution (Overview of C)

Downloaded from

Course organization. Course introduction ( Week 1)

.. Cal Poly CPE 101: Fundamentals of Computer Science I Alexander Dekhtyar..

KARMAYOGI ENGINEERING COLLEGE, Shelve Pandharpur

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

INDORE INDIRA SCHOOL OF CAREER STUDIES C LANGUAGE Class B.Sc. - IIND Sem

The detail of sea.c [1] #include <stdio.h> The preprocessor inserts the header file stdio.h at the point.

Chapter 21: Introduction to C Programming Language

Guide for The C Programming Language Chapter 1. Q1. Explain the structure of a C program Answer: Structure of the C program is shown below:

UNIT III (PART-II) & UNIT IV(PART-I)

COSC2031 Software Tools Introduction to C

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

cs3157: another C lecture (mon-21-feb-2005) C pre-processor (3).

Fundamentals of Programming. Lecture 11: C Characters and Strings

c) Comments do not cause any machine language object code to be generated. d) Lengthy comments can cause poor execution-time performance.

Q 1. Attempt any TEN of the following:

Intro to Computer Programming (ICP) Rab Nawaz Jadoon

C: Pointers, Arrays, and strings. Department of Computer Science College of Engineering Boise State University. August 25, /36

M1-R4: Programing and Problem Solving using C (JAN 2019)

Muntaser Abulafi Yacoub Sabatin Omar Qaraeen. C Data Types

Transcription:

Multiple Choice Questions ( 1 mark) Unit-1 1. is a step by step approach to solve any problem.. a) Process b) Programming Language c) Algorithm d) Compiler 2. The process of walking through a program s logic on paper before you actually write the program is called. a) desk checking b) flowcharting c) pseudocoding d) testing 3. Which symbol is used to represent output in a flowchart? a) square b) circle c) parallelogram d) triangle 4. is a pictorial representation of an algorithm. a) Data Diagram b) Flow Chat c) Pie Chart d) Program 5. What is the standard decision symbol for a flowchart? a) circle b) lozenge c) diamond d) square 6. Mnemonic a memory trick is used in which of the following language? a) Machine Language b) Assembly Language c) High Level Language d) None of above 7. The translator program used in assembly language is called. a) Compiler b) Interpreter c) Assembler d) None of above d) Translator 8. is easily relocatable language. a) Machine Language b) Assembly Language c) High Level Language d) Medium Level Language 9. Which of the following is called low level languages? a) Machine Language b) Assembly Language c) Both of the above d) None of above 10. Which of the following is problem oriented language? a) High level language b) Machine language c) Assembly language d) Low level language 11. A compiler is a translating program which a) Translates instruction of a high level language into machine language b) Translates entire source program into machine language program c) It is not involved in program s d) All of above execution 12. Which of the following is machine independence program? a) High level language b) Machine language c) Assembly language d) Low level language 13. Which is the limitation of high level language? a) Lower efficiency b) Machine dependence c) Machine level coding d) None of above 14. High level language is also called a) Problem Oriented Language b) Business Oriented Language c) Mathematically Oriented Language d) All of above 15. C language is a) High level language b) Machine language c) Assembly language d) Low level language SEMCOM Page - 1 - of 10

Unit-2 1. is a valid variable name. a) int b) float 3) tot_sum 4) 9Sum 2. In which section consists of Header files. a) Main() 2) Definition 3) Documentation 4) Link Section 3. is a invalid variable name. a) INT b) pi c) int marks d) total_marks 4. What is the output of 9/2- (5%3) a) 2 b) -2 c) 0 d) 3 5. The range of int data type is bytes. a) 2 b) 4 c) 8 d) 16 6. What is the value of I after the following execution? I=1; ++I =+ 3; a) 2 b) 5 c) 1 d) 0 7. The value can be changed during program execution is known as. a) Variable b) constant c) Operator d) None of these 8. The combination of? and : is known as operator. a) Ternary b) Arithmetic c) dot d) Relational 9. The value can not be changed during program execution is known as. a) Variable b) constant c) Operator d) None of these 10. format specifier used for floating data type. a) %d b) %f c) %c d) %e 11. Which of the following section is compulsory in C program? a) Main() b) Definition c) Documentation d) None of these 12. By default digits in float type variable after decimal point. a) 2 b) 4 c) 6 d) 8 13. Which of the following backslash character constant is used for horizontal tab? a) \n b) \t c) \h d) \y 14. format specifier used for integer data type. a) %d b) %f c) %c d) %e 15. The range of double data type is bytes. a) 2 b) 4 c) 8 d) 16 16. I=10; j=++i; i++; then i= and j= a) 21, 22 b) 25, 21 c) 22, 32 d) 12, 11 SEMCOM Page - 2 - of 10

Unit-3 1. Do-while loop is also known as loop. a) Entry level b) Exit level c) a & b d) None of these 2. statement terminates the execution of loop. a) Continue b) break c) switch d) none of these 3. statement skips the remaining statement of the loop and control transfer to the condition. a) Break b) Continue c) if d) switch 4. The Switch expression can be an type. a) Integer b) float c) double d) none of these 5. The following is not true for switch statement. a) break is optional in switch b) default is optional in switch c) we can define same case label more than once 6. loop execute at least once. a) while loop b) do...while c) if d) for 7. While (1) { printf( Hello ); } How many times execute above loop? a) 1 b)10 c) infinite time d) finite time 8. Identified from the following after which statement; is required. a) for b) nested if c) continue d) none of these 9. types of control structure available in C language. a) 1 b) 2 c) 3 d) 4 10. For declaring one- dimensional array subscript is use. a) One b) Two b) Three d) All of above 11. Individual value in array is called. a) Element b) Number c) Index d) Element and number 12. For declaring two- dimensional array subscript is use a) One b) Two c) Three d) All above 13. In Array subscript can begin with number a) Zero b) One c) Three d) None of these 14. When we declare array data type is use. a) int b) char c) float d) All of above 15. For Initialization of array list of value separated by a) Question marks (? ) b) Commas (, ) c) Exclamatory marks (!) d) None of these d) we can define switch within another switch SEMCOM Page - 3 - of 10

16. An array can be initialize either at compile time or at a) Run Time b) Allocation Time c) Released Time d) Not of above 17. In two dimensional array the first subscript is define size. a) Row b) column c) Vector d) All of above 18. In two dimensional array the second subscript is define size a) Row b) column c) Vector d) All of above 19. isdigit( ) function is available in a) <stirng.h> b) <ctype.h> c) <conio.h> d) <math.h> 20. abs ( ) function is available in a) <stirng.h> b) <stdlib.h> c) <conio.h> d) <math.h> 21. is return the absolute value. a) abs( ) b) isdigit( ) c) isupper( ) d) islower( ) 22. isalpha( argument ) function is return where the argument is not alphabetic a) zero b) one c) three d) none of these 23. isupper( ) function is available in a) <stirng.h> b) <ctype.h> c) <conio.h> d) <math.h> Unit-4 1. \0 is a) Null Character b) Character value c) Escape sequence d) Symbolic Constant 2. A group of character is known as a) String b) Array c) Function d) All of above 3. When we declare string data type is use. a) int b char c) float d) All of above 4. A group of character in string defines in quotation marks. a) Single b) Double c) Three d) Multi 5. is use to print the double quote in the string a) Back slash b) Forward slash c) Tab d) None of these. 6. operation is performed on string a) Reading b) Copying c) Writing d) All of above. 7. function is use to reading the string a) scanf() b) printf() c) strrev() d) strlen() 8. function is use to writing the string. a) scanf() b) printf() c) strrev() d) strlen() SEMCOM Page - 4 - of 10

9. Ampersand (&) is not required when read the value. a) int b) float c) string d) All of above. 10. Reading a specified number of character from the input string is use in scanf Function. a) %d b) %S c) %ws(w=number) d) %ld 11. Reading single character form the keyboard function is use. a) putchar( ) b) getchar() c) getc() d) putc() 12. function is use for reading the string with the whitespace. a) gets() b puts() c) getc() d) putc() 13. gets () function is available in header file. a) <stdio.h> b) <conio.h> c) <math.h> d) All of above 14. The function putchar ( ) requires parameter. a) One b) Two c) Three d) Four 15. puts () function is available in header file. a) <stdio.h> b) <conio.h> c) <math.h> d) All of above 16. What is the O/P of the following code in arithmetic code on character? x = z -1; a) x = 121 b) x = 125 c) x = 112 d) None of these 17. The string function is use to joins two string. a) strcat() b) strlen() c) strupr() d) strrev() 18. If both the string are same then the comparison value is. a) Zero b) One c) Minus One d) None of these 19. strcmp () function is use for two string. a) Concate b) Join c) Compare d) All of above 20. strcmp( ABCD, abcd ) = a) 0 b) 32 c)-32 d) -1 21. strcpy () function works like operator. a) assignment b) logical c) bit-wise d) relational 22. Assign the value of one string into another string function is use. a) strcpy() b) strlen() c) strupr() d) strrev() 23. function count and return the number of character in a string. a) strcpy() b) strlen() c) strupr() d) strrev() 24. function is use for reverse the string. a) strcpy() b) strlen() c) strupr() d) strrev() SEMCOM Page - 5 - of 10

25. Command line argument : main(int argc,char *argv[])consider the above example the variable is count the number of argument in command line. a) argc b) argv c) int d) main( ) 26. Every c program begins its execution with a) { b) clrscr ( ) c) main ( ) d) #include<stdio.h> 27. The following are the user defined function. a) main ( ) b) printf ( ) c) scanf ( ) d) sqrt ( ) 28. printf ( ) and scanf ( ) is type of function. a) Library b) User-define c) main d) None of above 29. C function can be classified in catagory. a) one b) two c) three d) nine 30. All function by default return a) integer b) float c) void d) string 31. Function header consists of parts. a) one b) two c) three d) none of above 32. A function definition is also known as. a) function implementation b) function call c) function type d) none of above. 33. The parameter is also known as a) argument b) variable c) data type d) array 34. A parameter list in function can be separated by a) Question marks (? ) b) Commas (, ) c) Exclamatory marks (!) d) None of these 35. A function can be surrounded by a) parentheses b) square brackets c) queerly brackets d) none of these 36. The following are wrong declaration in function definition. a) int sum(int a, float b) b ) float sum( int a,float b) c) int sum( int a,b) d) float sum(float a, float aa) 37. A statement that returns the value evaluated by the function. a) goto b) break c) return d) none of these 38. When the function return any value at that time it return value per function call. a) one b) two c) three d) multiple 39. When the function is called argument is passed. a) actual b) formal c) actual & formal d) none of these 40. A function declaration is also known as a) function implementation b) function call c) function type d) function prototype. SEMCOM Page - 6 - of 10

41. If the function has no formal parameter,the list is written as a) ( void ) b) ( int ) c) ( float ) d) none of these 42. The return type must be if no value return from the function. a) void b) int c) float d) none of these. 43. If the function are declare in the global declaration section the prototype is referred as prototyped. a) global b) local c) formal d) none of these 44. If the function are declare in the local declaration section the prototype is referred as prototyped. a) global b) local c) formal d) none of these 45. User Defined Function can be classified in to category a) one b) two c) three d) four Short Question ( 2 marks) Unit-1 1. What is an algorithm? List Characteristics of an algorithm. 2. Write advantages and disadvantages of an algorithm. 3. Write an algorithm/flowchart for following. 1) To find simple interest. Hint: SI = (P * R * N)/100 2) To find maximum of given three numbers. 3) To find out N! (Factorial of N). 4) To find weather given number is odd or even. 4. What is flowchart? List Symbols used in flowchart. 5. Write advantages and disadvantages of flow chart. 6. List symbols used to draw flow chart. Explain any one. 7. List Rules to draw flow chart. 8. What is an Editor? Give 3 examples of Well Known Editors. 9. List Languages for all generation. 10. Write advantages and disadvantages for following. 1) Machine Level or Low Level Language (1GL) 2) Assembly Language (2GL) 3) High Level Language (3GL) 11. What is Translator? List all translators. 12. Explain any one translator in detail. Unit-2 1. Draw the basic structure of C program. 2. Write Rules of variable name. 3. Explain printf() statement with 4. Explain scanf() statement with 5. Explain ternary operator with 6. Explain short hand operator in brief. 7. Write difference between pre-increment and post- increment operator. 8. Explain if statement with SEMCOM Page - 7 - of 10

Unit-3 1. Explain break and continue statement in C. 2. Explain do-while statement with 3. Explain break statement with 4. Write difference between break and continue. 5. Write difference between exit and entry controlled loop. 6. Explain structure programming in brief. 7. What is array? List out the type of array use in c programming. 8. What is an array? Write syntax to declare 1D array in c. Also give one 9. Write the syntax of compile time initialization of 1D array in c. Also give 10. Write the syntax of run time initialization of 1D array in c. Also give 11. What is an array? Write syntax to declare 2D array in c. Also give one 12. Write the syntax of compile time initialization of 2D array in c. Also give 13. Write the syntax of run time initialization of 2D array in c. Also give 14. List out any four mathematical functions. 15. Explain the isalpha ( ) function. 16. Explain the isdigit ( ) function. 17. Explain the islower ( ) function. 18. Explain the isupper ( ) function. 19. Explain the pow ( ) function. 20. Explain the sqrt ( ) function. 21. Explain the abs ( ) function. 22. Explain the clrscr ( ) function. 23. Explain the getch ( ) function. ]Unit-4 1. What is string? List out the operation perform on the string. 2. What is string? Write the syntax of declaring string in c. Also give 3. What is string? How we can initialize the string variable. Give one 4. Explain gets ( ) function with syntax and 5. Explain puts ( ) function with syntax and 6. Explain strlen ( ) function with syntax and 7. Explain strrev ( ) function with syntax and 8. Explain strcmp ( ) function with syntax and 9. Explain strcpy ( ) function with syntax and 10. Explain strcat ( ) function with syntax and 11. Define function? List out type of function use in c. 12. What is user define function? Give one example of user define function. 13. What is library function? Give one example of library function. 14. Write deference between user define function and library function. 15. Write the advantage of function. 16. Define function? List out typed of element of user define function. 17. Write the syntax of the following. 1) Function definition. 2) Function call 3) Function declaration. 18. Define function? List out the category of function. SEMCOM Page - 8 - of 10

Long Question ( >= 3 marks) Unit-1 1. What is an algorithm? Write advantages and disadvantages of an algorithm. (4 marks) 2. Write an algorithm/flowchart for following. (each of 4 marks) 1) To find sum of odd value and even value digits of a given number. 2) To find out minimum from N numbers. 3) To check whether inputted number is prime number or not. 4) To check whether inputted number is palindrome number or not. 5) To check whether inputted number is Armstrong number or not. 6) To print N terms of Fibonacci series. 7) Sum=1 2 + 2 2 + 3 2 + 4 2 + 5 2 + 6 2 + 7 2 + and so on. 3. What is Flowchart? Explain Rules to draw flowchart. Also explain symbols used to draw flowchart. (8 marks) 4. What is flow chart? Write advantages and disadvantages of flowchart. (4 marks) 5. What is flow chart? Explain symbols used to draw a flow chart. 6. What is Translator? Explain compiler, Interpreter and Assembler. ( 8 Marks) 7. Explain High Level Language and Assembly Language in Detail. ( 8 Marks) 8. Write a note on Language Generation. (4 Marks) 9. Explain any one language from following in detail. (Each contain 4 Marks) 1) Machine Level or Low Level Language (1GL) 2) Assembly Language (2GL) 3) High Level Language (3GL) 10. Write difference between Interpreter and Compiler. Unit-2 1. Explain Basic Structure of C program. 2. What is operator? Explain different operators with 3. Explain Arithmetic operator & Relational operator with 4. Explain Relational and Pre and post increment operator with 5. What is Variable? How to declare and initialization of variable with 6. Explain basic data types used in C language. 7. What is the output for following? a) 4/3 % 9-3 b) (-7/3)+4%3/7 c) 8/4.0+(3.0/2)-1 d) 10/5-2*(3%6) e) ((3/2)*6/2-1) f) 7/2+(4.0*3)%2 8. Explain if..else & nested if statement with syntax and 9. Explain switch statement with syntax and Unit-3 1. Explain looping statement with syntax and 2. Explain while and for loop with syntax and 3. Write difference between do-while, while and for loop. 4. Define array? Also explain declaration of 1D and 2D array with syntax and 5. Explain initialization of 1D array with syntax and 6. Explain initialization of 2D array with syntax and example 7. Define 1D array? Explain the declaration and initialization of 1D array with syntax and 8. Define 2D array? Explain the declaration and initialization of 2D array with syntax and SEMCOM Page - 9 - of 10

9. Explain the following library function with syntax and 1) sqrt ( ) 2) isdigit ( ) 3) pow ( ) 4) islower ( ) 10. Explain the following library function with syntax and 1) abs ( ) 2) isalpha ( ) 3) clrscr ( ) 4) isupper ( ) Unit-4 1. Explain arithmetic operation in character with 2. Explain gets and puts function with syntax and 3. Explain command line argument in c with 4. Explain following function with syntax and 1 ) strlen ( ) 2) strcat ( ) 3) strcpy ( ) 4) strrev ( ) 5. Explain following function with syntax and 1) strcmp ( ) 2) gets ( ) 3) puts ( ) 4) strrev ( ) 6. Define function? Explain type of function use in c with 7. Explain function definition with syntax and 8. Explain function call with syntax and example 9. Explain function declaration with syntax and example 10. Explain formal parameter and actual parameter with 11. Explain return statement with syntax and And also explain the return type in C language. 12. Explain the function category with no argument and no return value with 13. Explain the function category with argument and no return value with 14. Explain the function category with no argument and return value with 15. Explain the function category with argument and return value with 16. What is user defined function? Explain element of user define function. 17. Explain the following category of function with 1 ) no argument & no return value 2) with argument & no return value SEMCOM Page - 10 - of 10