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

Similar documents
C-LANGUAGE CURRICULAM

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

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

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

Multiple Choice Questions ( 1 mark)


Model Viva Questions for Programming in C lab


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

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

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

Assignment: 1. (Unit-1 Flowchart and Algorithm)

Code No: R Set No. 1

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

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

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

Chapter 8 Character Arrays and Strings

ONE DIMENSIONAL ARRAYS

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

C: How to Program. Week /Mar/05

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

CP FAQS Q-1) Define flowchart and explain Various symbols of flowchart Q-2) Explain basic structure of c language Documentation section :

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

Long Questions. 7. How does union help in storing the values? How it differs from structure?

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

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

Chapter 2 - Introduction to C Programming

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

Differentiate Between Keywords and Identifiers

This exam is to be taken by yourself with closed books, closed notes, no calculators.

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

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

Q1. Multiple Choice Questions

DETAILED SYLLABUS INTRODUCTION TO C LANGUAGE

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

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

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

Model Viva Questions for Programming in C lab

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

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

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

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

Computers Programming Course 5. Iulian Năstac

C Programming Multiple. Choice

Computers Programming Course 6. Iulian Năstac

Lecture 2: C Programming Basic

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

Introduction to C Programming

C Programming for Electronic Engineers

Important Questions for Viva CPU

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

A Fast Review of C Essentials Part I

Contents. Preface. Introduction. Introduction to C Programming

Full file at C How to Program, 6/e Multiple Choice Test Bank

C Refresher, Advance C, Coding Standard, Misra C Compliance & Real-time Programming

Introduction to C/C++ Lecture 5 - String & its Manipulation

DEPARTMENT OF MATHS, MJ COLLEGE

Introduction. C provides two styles of flow control:

Introduction to C Programming. Chih-Wei Tang ( 唐之瑋 ) Department of Communication Engineering National Central University JhongLi, Taiwan

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:

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

Chapter 9 Strings. With this array declaration: char s[10];

Object Oriented Pragramming (22316)

Q 1. Attempt any TEN of the following:

15 FUNCTIONS IN C 15.1 INTRODUCTION

Euclid s algorithm, 133

Fundamentals of Programming. Lecture 3: Introduction to C Programming

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

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

Review of the C Programming Language for Principles of Operating Systems

BLM2031 Structured Programming. Zeyneb KURT

Decision Making -Branching. Class Incharge: S. Sasirekha

ARRAYS(II Unit Part II)

Basics of Programming

Fundamental of Programming (C)

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

C - Basic Introduction

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

LESSON 4. The DATA TYPE char

C programming basics T3-1 -

ANSI C Programming Simple Programs

CHRIST THE KING BOYS MATRIC HR. SEC. SCHOOL, KUMBAKONAM CHAPTER 9 C++

ET156 Introduction to C Programming

Chapter 21: Introduction to C Programming Language

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

Advanced C Programming and Introduction to Data Structures

Introduction to string

from Appendix B: Some C Essentials

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

Course organization. Course introduction ( Week 1)

Introduction to Programming Using Java (98-388)

(2½ Hours) [Total Marks: 75

HISTORY OF C LANGUAGE. Facts about C. Why Use C?

Programming and Data Structures

Fundamentals of Programming Session 4

C OVERVIEW. C Overview. Goals speed portability allow access to features of the architecture speed

Chapter 8 - Characters and Strings

Strings and Library Functions

by Pearson Education, Inc. All Rights Reserved.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified)

Transcription:

Unit 1 Programming Language and Overview of C 1. State whether the following statements are true or false. a. Every line in a C program should end with a semicolon. b. In C language lowercase letters are significant. c. Syntax errors will be detected by the compiler. d. All variables must be given a type when they are used. e. The underscore can be used anywhere in an identifier. f. The keyword void is a data type in C. g. The scanf function can be used to read only one value at a time. h. All arithmetic operators have the same level of precedence. i. A unary expression consists of only one operand with no operators. j. The purpose of the header file <stdio.h> is to store the programs created by the users. k. The getchar cannot be used to read a line of text from the keyboard. l. The scanf function cannot be used to read a single character from the keyboard. 2. Fill in the blanks with appropriate words. a. Every program statement in a C program must end with a. b. The Function is used to display the output on the screen. c. The header file contains mathematical function. d. A global variable is also known as variable. e. The operator cannot be used with real operands. f. The specification is used to read or write a short integer. g. For using character functions, we must include the header file in the program. h. For reading a double type value we must use the specification. 3. State major components of computer. 4. Define Hardware.

5. Define Software. 6. Mention any basic programming language. 7. What is the use of comments in programs? 8. What is the purpose of stdio.h file? 9. What is character set? 10. Which special symbol is used in variable name? 11. Which of the following are invalid variable names and why? 12. What is the range of value of int data type? 13. What is operand? 14. What is the use of assignment operator? 15. What is arithmetic expression? 16. Which function is used for reading character from screen? 17. Which function is used for writing character from screen? 18. Which function is used to provide formatted input? 19. Which function is used to provide formatted output? 1. What is programming language? 2. What is compiler? 3. What is interpreter? 4. Define linker. 5. Define assemble. 6. Define algorithm. 7. Explain #define directive. 8. Explain #include directive. 9. What is use of printf() with example. 10. What is use of scanf() with example. 11. What does void main()? 12. What do you mean by keywords? 13. List types of constants.

14. List types of data types. 15. Define constants. 16. List all operators available in C programming. 17. List relational operator with its meaning. 18. Mention rules for identifiers. 19. What is meant by declaration of variable? 20. Which type of data can be stored by that variable 21. What is meant by assigning values to variable? 22. What is operator? 23. What is meant by increment and decrement operator? 1. Write a short note on the symbols used to draw a flow chart. 2. Describe the four basic data types. 3. Describe the structure of C program. 4. Explain operator available in C language. 5. Explain arithmetic operator with example. 6. Write a note on scanf ( ) with its rules. 7. Describe formatted input with example. 8. Describe formatted output with example. Unit 2 Decision Making, Branching, Looping Statement and Array 1. State whether the following statements are true or false. a. One if can have more than one else clause. b. A switch statement can always be replaced by a series of if else statements. c. A program stops its execution when a break statement is encountered. d. The do while statement first executes the loop body and then evaluate the loop control expression.

e. In a for loop expression, the starting value of the control variable must be less than its ending value. f. While loops can be used to replace for loops without any change in the body of the loop. g. The type of all elements in an array must be the same. h. When an array is declared, C automatically initializes its elements to zero. i. Accessing an array outside its range is a compile time error. 2. Fill in the blanks with appropriate words. a. Multiway selection can be accomplished using an else if statement or the statement. b. The statement when executed in a switch statement causes immediate exit from the structure. c. In an exit-controlled loop, if the body is executed n times, the test condition is evaluated times. d. An array can be initialized either at compile time or at. 3. Mention decision making statements. 4. What is another name of decision making statements? 5. What is the need of nesting of if else if ladder? 6. Which keyword is used to stop program execution? 7. Which case is required in switch statements? 8. Which decision statement is used for multiway selection? 9. Write general form of conditional operator. 10. What is entry controlled loop? 11. What is exit controlled loop? 12. Which keyword is used to terminate loop? 13. Which statement is used to skip a part of the statements in a loop? 14. What is one-dimensional array? 1. Why decision making statements are required?

2. List different forms of If statements. 3. Write a syntax of simple if statement. 4. Write a syntax of if else statement. 5. What is break? 6. What is continue? 7. What is GOTO? 8. What is switch case statement? 9. What is forward jump? 10. What is backward jump? 11. What is the need of looping? 12. What is meant by looping? 13. List loop statements. 14. Explain looping process. 15. Write syntax of do statement. 16. Write syntax of while statement. 17. Write syntax of for statement. 18. What is array? 19. List types of arrays. 20. What is two-dimensional array? 1. Explain decision making with if else statement. 2. Describe switch case with its rules. 3. Illustrate GOTO statement with example. 4. Write an essay on looping structure and illustrate. 5. Explain Do While looping. 6. Elaborate array with declaration and initialization of one-dimensional array. 7. Describe two-dimensional array with declaration and initialization.

Unit 3 String and Functions 1. State whether the following statements are true or false. a. The gets function automatically appends the null character at the end of the string read from the keyboard. b. When reading a string with scanf, it automatically inserts the terminating null character. c. String variables cannot be used with the assignment operator. d. The function call strcpy (s2,s1); copies string s2 into string s1. 2. Fill in the blanks with appropriate words. a. The function strncat has parameters. b. The function is used to determine the length of a string. c. The function is used to sort the string in alphabetical order. d. The printf may be replaced by function for printing strings. 3. What is string? 4. Which datatype is not supported by C? 5. Write general form of declaration of string variable. 6. Which function is used for comparison of string? 7. Which header file is contains gets function? 8. How many parameters required in putchar function? 9. Which function is converts a string of digits into their integer values? 10. What is the use of strcat( )? 11. What is the use of strcmp( )? 12. What is the use of strcpy( )? 13. What is the use of strlen( )? 14. Which function is used for copying one string to another string? 15. What will be the output of the following statement? printf ( %d, strcmp ( push, pull ));

1. Why do we need a terminating null character? 2. What is gets function? 3. Define getchar. 4. What is puts function? 5. Mention most commonly used string-handling functions. 6. Explain strcat( ). 7. Define strncat( ). 8. What is the use of strcmp function? 9. Explain strcpy( ). 10. Explain strlen( ). 1. Explain string handling function. 2. Explain strcat( ) function with example. 3. Explain strcmp( ) function with example. 4. Explain strcpy( ) function with example. 5. Explain strlen( ) function with example. Unit 4 User Defined Functions 1. State whether the following statements are true or false. a. A function in C should have at least one argument. b. A function can be defined and placed before the main function. c. Any name can be used as a function name. d. Only a void type function can have void as its argument. e. A function can call itself. 2. Fill in the blanks with appropriate words. a. The parameters used in a function call are called.

b. A variable declared in 3. Which function is used for copying one string to another string? 4. What is meant by calling function? 5. What is meant by function prototype? 6. What is function header? 7. What is function body? 8. Mention parts of function body. 9. Which types of variables cannot be declared as auto variables? 10. Which is default return type of a function? 11. What is argument? 12. State parts of function declaration. 13. Write syntax of function declaration. 14. Mention types of functions. 1. What is function? 2. What is function definition? 3. List categories of function. 4. List elements of function. 5. What is function name and type? 6. What is formal parameter list in function? 7. What is actual parameter in function? 8. List elements of function definition. 9. Write the main difference between user-defined function and library function. 10. What is global prototype? 11. What is local prototype? 12. What is scope of variable? 13. What is call by value?

14. What is call by references? 15. Explain function with operators. 16. Explain function with decision statements. 17. What is Automatic variable? 18. What is External variable? 19. What is Static variable? 20. What is Register variable? 1. What is the need of user-defined function? 2. Describe function definition with function declaration. 3. Explain function with no arguments and no return value with example. 4. Explain function with arguments and no return value with example. 5. Describe function with arguments and one return value with example. 6. Illustrate function with no arguments but return value with appropriate example. 7. What are different types of storage class? Unit 5 Structure and Unions 1. What is the use of structure? 2. What is structure element? 3. What is structure tag? 4. Write syntax of structure. 5. What is nesting of structure? 6. What is the use of union? 1. What is structure? 2. List elements of a structure variable declaration. 3. What is member operator?

4. What is array of structure? 5. What is structure of structure? 6. What is union? 7. What is difference between union and structure? 1. Describe declaring structure with structure initialization. 2. Explain copying and comparing structure with example. 3. Write rules for initializing structure. 4. Explain arrays of structure with example. 5. Write a C program to declare a structure of Book with properties bookid,name,author and price and initialize the structure with one book values. Unit -6 Pointers 1. What is the value of pointer? 2. Which operator is used to define a pointer variable? 3. Which operator is used to by pointer variable to accessing the address of variable? 4. Write syntax of declaring of pointer. 5. What is chain of pointer? 6. What is array of pointer? 7. Define reference operator. 8. Write one example of declaring variable of pointer type. 9. How to declare pointer array? 10. What will int *p =&q stores? 1. What is pointer? 2. What is pointer variable? 3. What is pointer to pointer?

4. Write in brief about pointer arithmetics. 5. Write in brief about null and void pointer. 6. Enlist the use of pointer. 7. Give an example of pointer as function argument. 8. Differentiate between *p[3] and (*p)[3]. 1. Write a short note on benefits of pointer. 2. Explain pointer expression with example. 3. Explain pointer array with example. 4. Write a note on array of pointers with example. 5. Define pointer with its benefits and draw a diagram representing pointer variable.