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

Similar documents
M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

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

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

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

Introduction to C Language (M3-R )

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

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

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

C Programming Multiple. Choice

CSCI 171 Chapter Outlines

C-LANGUAGE CURRICULAM

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

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

Multiple Choice Questions ( 1 mark)

Model Viva Questions for Programming in C lab

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

A Fast Review of C Essentials Part I

DETAILED SYLLABUS INTRODUCTION TO C LANGUAGE

Computers Programming Course 5. Iulian Năstac

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

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

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

Code No: R Set No. 1

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

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

6.096 Introduction to C++ January (IAP) 2009

C programming basics T3-1 -

I Internal Examination Sept Class: - BCA I Subject: - Principles of Programming Lang. (BCA 104) MM: 40 Set: A Time: 1 ½ Hrs.

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

CS201 Some Important Definitions

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

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

OBJECTIVE QUESTIONS: Choose the correct alternative:

CS201- Introduction to Programming Current Quizzes

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

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

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

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

BLM2031 Structured Programming. Zeyneb KURT

Dynamic Memory Allocation

Contents. Preface. Introduction. Introduction to C Programming


LESSON 5 FUNDAMENTAL DATA TYPES. char short int long unsigned char unsigned short unsigned unsigned long

Important Questions for Viva CPU

Advanced C Programming Topics

Fundamentals of Programming

Exam 3 Chapters 7 & 9

Review of the C Programming Language for Principles of Operating Systems

Reg. No. : Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, JANUARY First Semester GE 6151 COMPUTER PROGRAMMING

UNIT- 3 Introduction to C++

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

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING PROGRAMMING TECHNIQUES I EE271

DEPARTMENT OF MATHS, MJ COLLEGE

Student Name: (in Capital Letters) CSE Introduction to Programming for Engineers and Scientists. Final Exam

Problem Solving and 'C' Programming

C: Arrays, and strings. Department of Computer Science College of Engineering Boise State University. September 11, /16

COMP26120: Pointers in C (2018/19) Lucas Cordeiro

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

Course organization. Course introduction ( Week 1)

CS Programming In C

Chapter 2 - Introduction to C Programming

Fundamental of Programming (C)

Review of the C Programming Language

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

Advanced C Programming and Introduction to Data Structures


Computers Programming Course 6. Iulian Năstac

Lecture 03 Bits, Bytes and Data Types

Data Types. Data Types. Integer Types. Signed Integers

Fundamental of C programming. - Ompal Singh

Differentiate Between Keywords and Identifiers

Computer Programming C++ (wg) CCOs

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

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:

C Programming Language (Chapter 2 of K&R) Variables and Constants

Programming for Engineers Iteration


CSE 12 Spring 2018 Week One, Lecture Two

Q1. Multiple Choice Questions

Quiz 0 Review Session. October 13th, 2014

Chapter 7. Basic Types

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

CHAPTER 1 Introduction to Computers and Programming CHAPTER 2 Introduction to C++ ( Hexadecimal 0xF4 and Octal literals 031) cout Object

C: How to Program. Week /Mar/05

Model Viva Questions for Programming in C lab

CSE 30 Fall 2013 Final Exam

Engineering Computing I

DECLARAING AND INITIALIZING POINTERS

A flow chart is a graphical or symbolic representation of a process.

ET156 Introduction to C Programming

C mini reference. 5 Binary numbers 12

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

High Performance Computing in C and C++

Come and join us at WebLyceum

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Short Notes of CS201

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

Introduction to C Language

COMPUTER APPLICATION

Transcription:

M1-R4: Programing and Problem Solving using C (JULY 2018) Max Marks: 100 M1-R4-07-18 DURATION: 03 Hrs 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the OMR answer sheet supplied with the question paper, following instructions therein. 1.1 Which programming method is followed in C language a) Algorithm b) Flow-Charts c) Procedural d) Object Oriented 1.2 getchar() function is available in which header file? a) Stdio.h b) Conio.h c) Math.h d) Header.h 1.3 Find the output of following code : int i=-2; printf ( -i=%d,-i); return b; a) i=2 b) i=-2 c) i=-2 d) i=+2 1.4 Which numbering system is not handled directly by the printf() conversion specifies? a) Decimal b) Binary c) Octal d) Hexadecimal (1x10) 1.5 Which of the following is an incorrect assignment statement? a) N=m=0 b) Value+=10 c) mysize=x<y?9:11 d) Value=+=10 1

1.6 What will be the output of the following program? int x=5; printf( %d %d %d,x,x<<2,x>>2); a) 1 20 5 b) 5 1 20 c) 5 20 1 d) 20 1 5 1.7 A programming construct in which a set of statement in a computer program can be executed repeatedly. i. Loop statement ii. Conditional Statement iii. Block Statement iv. All of the above 1.8 What will be the output of following program? for(int c=1;c<5;++c); printf( %d,c); a) 1 b) 5 c) 6 d) 12345 1.9 In C, if you pass an array as an argument to a function, what actually gets passed? a) Value of elements in array b) First element of the array c) Base address of the array d) Address of the last element of array 1.10 How many times is a do while loop guaranteed to loop? a) 0 b) Infinitely c) 1 d) Variable 2

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and enter your choice in the OMR answer sheet supplied with the question paper, following instructions therein. 2.1 Function can be called either by value or reference TRUE 2.2 A function cannot be defined inside another function. TRUE 2.3 Are the three declarations char **apple, char *apple[], and char apple[][] same? FALSE 2.4 A long double can be used if range of a double is not enough to accommodate a real number. TRUE 2.5 malloc() allocates memory from the heap and not from the stack. TRUE 2.6 While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters. FALSE 2.7 A union cannot be nested in a structure FALSE 2.8 The modulus operator cannot be used with a long double. TRUE 2.9 If the file to be included doesn t exist, the preprocessor flashes an error message. TRUE 2.10 A linked list is a linear data structure where each element is a separate object. TRUE 3 Match words and phrase in column X with the closed related meaning of word(s)/phrase(s) in column Y. Enter your selection in the OMR answer sheet supplied with the question paper, following instructions therein. X Y 3.1 Calls itself (D) A. Infinite loop if no break statement inside the loop 3.2 String copy (E) B. A user defined data type in C which allows you to combine different data types to store a particular type of record. 3.3 Unary operator (M) C. Modify the size of previously allocated space 3.4 while(2) (A) D. Recursive functions 3.5 Structure (B) E. Strcpy() 3.6 realloc (C) F. Explicit conversion 3.7 exit() (K) G. -- 3.8 Typecasting (F) H. Collection of similar type of data elements 3.9 \v used for (L) I. Logical operators 3.10 Array is a (H) J. strcat() K. Terminates program L. Vertical space M. + 3

4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list below. Choose the most appropriate option, enter your choice in the OMR answer sheet supplied with the question paper, following instructions therein. A. Const B. Continue C. Two-dimensional D. Flowchart E. fputs F. 2 bytes G. Six H. Break I. 4 bytes J. Sizeof K. Multi-dimensional L. * M. & 4.1 Function (E) fputs writes a line to a specified file 4.2 Pictoral representation of an algorithm is (D) Flowchart 4.3 A variable can be made constant by declaring it with the qualifier (A) Const at the time of initialization 4/4 The (J)sizeof Operator returns the number of byte the operand occupied. 4.5 By default, the real numbers are printed with a precision of (G) Six decimal places. 4.6 The (H) break statement when executed in a switch statement causes immediate exit from the structure 4.7 The (B) continue statement is used to skip a part of the statement in a loop. 4.8 An array that used more than two subscript is referred to as (K) Multi-dimensional array. 4.9 After incrementing a float pointer ptr by 1 it would be incremented by _(I) 4 Bytes 4.10 The (L) * operator returns the value of the variable to which its operand points. 5 PART-TWO (A) Write a C Program to display following pattern: A BB CCC DDDD EEEEE 4

(B) (C) Write a C program that displays the recommended actions depending on the color of a traffic light using the switch statement What is function? Explain uses of function.also explain decalarion function call and function definition with example. 6. A) Write a C program to find the frequency of characters in string. (B) Write a C program to store information (title, author, subject and book_id) of a Book using structure and display it in appropriate format. (c) Write a C program tio find largest element of any Array? 7. (a) Draw a flowchart to find the fibionacci series till term <=10000 (b) Explain different storage classes available in C 8. a) Explain about Pointer to function with suitable example b) What are the advantages and disadvantages of an Array? c) Write a C Program to copy test of one file to another file. 9. a) What is command line argument? Also explain how to pass command line arguments to C program b) What are preprocessor directives? Why do we need them? Explain various preprocessor directives. c) Explain the difference between Text Mode and Binary Mode files 5