OBJECTIVE QUESTIONS: Choose the correct alternative:

Similar documents

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

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

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:

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

Writing an ANSI C Program Getting Ready to Program A First Program Variables, Expressions, and Assignments Initialization The Use of #define and

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

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

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

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

Multiple Choice Questions ( 1 mark)

Functions. Systems Programming Concepts

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

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

CS3157: Advanced Programming. Outline

Functions. Functions are everywhere in C. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

CSCI 171 Chapter Outlines

Lecture 3: C Programm

BLM2031 Structured Programming. Zeyneb KURT

today cs3157-fall2002-sklar-lect05 1

Variation of Pointers

P.G.TRB - COMPUTER SCIENCE. c) data processing language d) none of the above

Compiling and Running a C Program in Unix

Short Notes of CS201

Computer Science & Information Technology (CS) Rank under AIR 100. Examination Oriented Theory, Practice Set Key concepts, Analysis & Summary

advanced data types (2) typedef. today advanced data types (3) enum. mon 23 sep 2002 defining your own types using typedef

CS201 - Introduction to Programming Glossary By

CSCE 206: Structured Programming in C++

Fundamentals of Computer Programming Using C

A Fast Review of C Essentials Part I

School of Computer Science Introduction to Algorithms and Programming Winter Midterm Examination # 1 Wednesday, February 11, 2015

C Functions. CS 2060 Week 4. Prof. Jonathan Ventura

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

Dr M Kasim A Jalil. Faculty of Mechanical Engineering UTM (source: Deitel Associates & Pearson)

C PROGRAMMING LANGUAGE. POINTERS, ARRAYS, OPERATORS AND LOOP. CAAM 519, CHAPTER5

COMPUTER APPLICATION

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 4

15 FUNCTIONS IN C 15.1 INTRODUCTION

Split up Syllabus (Session )

Unit 7. Functions. Need of User Defined Functions

QUIZ. 1. Explain the meaning of the angle brackets in the declaration of v below:


Introduction to C Language

Introduction to C Language (M3-R )

C Programming Multiple. Choice

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

Language Design COMS W4115. Prof. Stephen A. Edwards Spring 2003 Columbia University Department of Computer Science

AN OVERVIEW OF C, PART 3. CSE 130: Introduction to Programming in C Stony Brook University

Computer Science XII Important Concepts for CBSE Examination Questions

Introduction to C Final Review Chapters 1-6 & 13

Programming in C. main. Level 2. Level 2 Level 2. Level 3 Level 3

Review of the C Programming Language for Principles of Operating Systems

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

DECLARAING AND INITIALIZING POINTERS

Introduction to C++ with content from

Pace University. Fundamental Concepts of CS121 1

Model Viva Questions for Programming in C lab

Contents. Preface. Introduction. Introduction to C Programming

C PROGRAMMING QUESTIONS AND

CS201 Some Important Definitions


CSE 2421: Systems I Low-Level Programming and Computer Organization. Functions. Presentation C. Predefined Functions

calling a function - function-name(argument list); y = square ( z ); include parentheses even if parameter list is empty!

First of all, it is a variable, just like other variables you studied

Lecture 2: C Programm

6.096 Introduction to C++ January (IAP) 2009

Introduction to Programming Using Java (98-388)

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

CS349/SE382 A1 C Programming Tutorial

Converting a Lowercase Letter Character to Uppercase (Or Vice Versa)

A3-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH 'C' LANGUAGE

ESC101N: Fundamentals of Computing End-sem st semester

Declaration Syntax. Declarations. Declarators. Declaration Specifiers. Declaration Examples. Declaration Examples. Declarators include:

CSSE 332 Standard Library, Storage classes, and Make

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

CS240: Programming in C

BİL200 TUTORIAL-EXERCISES Objective:

Lectures 5-6: Introduction to C

Sri Vidya College of Engineering & Technology

KLiC C Programming. (KLiC Certificate in C Programming)

Computers Programming Course 10. Iulian Năstac

Review of the C Programming Language

OpenCL C. Matt Sellitto Dana Schaa Northeastern University NUCAR

CS16 Exam #1 7/17/ Minutes 100 Points total

EL6483: Brief Overview of C Programming Language

CS201- Introduction to Programming Current Quizzes

CMPE-013/L. Introduction to C Programming

Why Pointers. Pointers. Pointer Declaration. Two Pointer Operators. What Are Pointers? Memory address POINTERVariable Contents ...

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9

Chapter 15 - C++ As A "Better C"

C Language, Token, Keywords, Constant, variable

Functions. Autumn Semester 2009 Programming and Data Structure 1. Courtsey: University of Pittsburgh-CSD-Khalifa

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

Introduction to C++ Introduction. Structure of a C++ Program. Structure of a C++ Program. C++ widely-used general-purpose programming language

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

BSM540 Basics of C Language

Recap. ANSI C Reserved Words C++ Multimedia Programming Lecture 2. Erwin M. Bakker Joachim Rijsdam

UNIT 3 FUNCTIONS AND ARRAYS

Computers Programming Course 5. Iulian Năstac

Absolute C++ Walter Savitch

Transcription:

OBJECTIVE QUESTIONS: Choose the correct alternative: 1. Function is data type a) Primary b) user defined c) derived d) none 2. The declaration of function is called a) function prototype b) function call c) function definition d) function creation 3. Which storage class will lead to faster execution? a) static b) automatic c) register d)extern 4. If local & global variable have the same name,then a) local variable have more precedence than global variable. b) global variable have more precedence than local variable. c) local &global variable have same d) none 5. Array is of a) Scalar type b) Aggregate type c) Union type d) Enumerated type 6. Array name is a a) Variable b) Pointer to constant c) Constant pointer d) Constant 7. Which of the following is true about array? a) Array elements are stored in contiguous memory locations b) In c arrays are stored in row-major order c) An array can be declared as local as well as global d) All the above 8. Which of the following correctly declares an array? a) int anarray[10]; b) int anarray; c) anarray{10}; d) array anarray[10]; 9. Main() is function a)user defined b) library c) primary d) keyword 10. A function calling itself is a) primary function b) recursive function c) non-recursive function d) iterative function 11. Which of the following statement is false a)functions facilities top-down modular programming b) functions increases the length of program c)it is easy to locate & isolate faulty functions d) functions are derived data types. 12. In c language, function call would be on left-hand side of assignment statement. a) yes b) no c) can t say d) none

13. main() function has arguments a) yes b) no c) can t say d) none 14. Nesting of functions is a) function calling other function b) function calling itself. c) Function definition inside another function definition d) a & b 15. Which storage class retains the value across different function calls? a) static b) automatic c) register d)extern 16. Which is default storage class? a) static b) automatic c) register d)extern 17. Extern declaration doesn t allocate storage space for variables. a) yes b) no c) can t say d) none 18. Default initial value is 0 in a) auto b) register c) extern d) none 19. Which of these is the correct form of function definition? a) int func(a,b) {int a,b;..} b) int func(int a,b) {.} c) int func(a,b) int a,int b{.} d) int func(a,b) int a,b;{.} 20. Which of the following is a two-dimensional array? a) array anarray[20][20]; b) int anarray[20][20]; c) int array[20, 20]; d) char array[20]; 21. What is the index number of the last element of an array with 29 elements? a) 29 b) 28 c) 0 d) Programmer-defined 22. When an argument is passed by reference, the of data is passed to the function. a) copy b) address c) value d) none. 23. int i; main(){ printf( %d,i); i++; Val(); printf( %d,i); Val();} Val(){ i=100; printf( %d,i); i++;} a) 0 100 101 101 b) 0 100 101 101 100 c) 0 100 100 101 d) garbage values

24. main(){ static int c=s; printf( %d,c--); if(c) main();} a) 5 4 3 2 1 b) infinite loop c) error d) none 25. When a function is recursively called,all automatic variables a) are initialized during each execution of function b) are retained from the last execution c) are maintained in stack d) none 26. Use of macro in the place of functions a) reduces execution time b) reduced code size c) increases execution time d) none 27. #define disp(x) printf( x ); main(){ disp( hello );} output is: a) hello b) hello c) x d) none of these 28. main() { printf( %d, printf( %c,0); } a) 1 b) 0 1 c) 0 0 d) 1 0 29. Which of the following is not a function of ctype.h? a) isalpha() b) islower() c) isspace() d) none of these 30. Which of the following is not a part of a function header? a) name b) parameter list c) return type d) title 31. By default the function returns a) integer value b) float value c) char value d) none 32. The meaning of keyword void before the function name means a) function should not return any value b) function should return any value c) no arguments are passed d) none 33. If the CPU fails to keep the variable in CPU register in that case the variables are assumed

a) automatic b) static c) external d) none 34. C preprocessor a) takes care of conditional compilation b) takes care of macro c) takes care of include files d) acts before compilation 35. A preprocessor command a) need not start on a new line b) need not start on the first column c) has # as the first character d) comes before the first executable statement. 36. The order in which actual parameters are evaluated in a function call a) is from the left b) is from the right c) is compiler dependent d) none 37. The default parameter passing mechanism is a) call by value b)call by reference c)call by value reference d)none 38. The function that returns the absolute value of a long integer is a) abs b) dabs c)fabs d)labs 39. main() { int a=2,b=10; printf( %d,mul(mul(a,b),b)); } mul(int x,int y); { return (x*y); } a)garbage value b)error c)20 d)200 40. Variables declared using storage class are not local type. a) auto b) register c) static d)extern 41. Calling function sends arguments to called function. a)formal b) actual c) static d)external 42. If you don t initialize a static array, what would be the elements set to? a) 0 b) an known value c) 1 d) the character constant \0 43. 2. The amount of storage required for holding elements of the array depends on a) size b) data type c) data type & size d) Runtime requirement 44. How many values a function can return at a time a) 2 b) any number of values c) only 1 d) no values 0 45. In which parameter passing mechanism, actual argument values are unchanged? a) By value b) by value reference

c) by name d) by reference 46. Which of the following is wrong with respect to functions a) it facilitates the top-down modular programming b) function will provide reusability of the code c) a function will always return some value d) reduce the length of the program 47. Which one of the following indicates that the function returns nothing a) main() b) void () c) function() d) All 48. What is the Standard Header File for the function abs() a) ctype.h b) stdlib.h c) math.h d) None 49. Function prototype scope is Used for identifiers in [ ] a) parameter list b) Blocks c) Arrays d)all 50. Communicating information between functions is possible from a) modules b) Parameters c) variables d) None 51. What is the Standard Header File for the function tolower() a) stdlib.h b) string.h c) ctype.h d) stdio.h 52. Where do you get more Performance [ ] a) Iteration b) Recursion c) Both A&B d) None 53. Which of the following is not an advantage of functions in C? a) Understandable and manageable b) Reusability of Code c) protect data d) Data binding 54. If a static array is not initialized, then its elements are set to a) zero b) a float number c) an undetermined value d) character constant 55. Array elements are stored in memory locations. a) direct b) sequential c) scattered d) random 56. Which of the following statement is wrong with respect to a storage class? a) It specifies the default initial value b) It specifies the life of a variable c) By default a storage class is static d) It specifies where the variable is stored Fill in the blanks: 1. When an argument is passed by reference, the of data is passed to the function. 2. Array symbol is 3. Default initial value is 0 in variable or storage class 4. Main() is function 5. is default storage class 6. function calling itself is 7. int a[2][3] is dimensional array declaration. 8. In char x[10] number of characters will be stored maximum. 9. In call by value parameter passing is

10. In call by reference parameter passing is 11. In Char a[2][3][2] declaration number of characters will be stored maximum 12. The parameters in a function definition are called as parameters 13. The array elements always stored in memory locations 14. Find out pow(2.5,3) = 15. An unspecified return-value-type is always assumed by the compiler to be 16. All functions return data type double 17. The technique used to pass data to a function is known as. 18. The allows us to control the compilation process by including or excluding statements. 19. The qualifier tells the computer that an object value may be changed by entities other than the program. 20. The length of the following array byte[ ] data = { 12,34,9,0,-62,88}is.