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

Size: px
Start display at page:

Transcription

1 M1-R4: Programing and Problem Solving using C (JULY 2018) Max Marks: 100 M1-R 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= 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

2 1.6 What will be the output of the following program? int x=5; printf( %d %d %d,x,x<<2,x>>2); a) b) c) d) 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) 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

3 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 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 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

5 (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

### M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be

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

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

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

C Programming Code: MBD101 Duration: 10 Hours Prerequisites: You are a computer science Professional/ graduate student You can execute Linux/UNIX commands You know how to use a text-editing tool You should

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

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be

### Introduction to C Language (M3-R )

Introduction to C Language (M3-R4-01-18) 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in OMR answer sheet supplied with the question paper, following

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

M1-R4: Programing and Problem Solving using C (JAN 2019) 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

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

C Programming Notes Dr. Karne Towson University Reference for C http://www.cplusplus.com/reference/ Main Program #include main() printf( Hello ); Comments: /* comment */ //comment 1 Data Types

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

Subject code - CCP01 Chapt Chapter 1 INTRODUCTION TO C 1. A group of software developed for certain purpose are referred as ---- a. Program b. Variable c. Software d. Data 2. Software is classified into

### C Programming Multiple. Choice

C Programming Multiple Choice Questions 1.) Developer of C language is. a.) Dennis Richie c.) Bill Gates b.) Ken Thompson d.) Peter Norton 2.) C language developed in. a.) 1970 c.) 1976 b.) 1972 d.) 1980

### CSCI 171 Chapter Outlines

Contents CSCI 171 Chapter 1 Overview... 2 CSCI 171 Chapter 2 Programming Components... 3 CSCI 171 Chapter 3 (Sections 1 4) Selection Structures... 5 CSCI 171 Chapter 3 (Sections 5 & 6) Iteration Structures

### C-LANGUAGE CURRICULAM

C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals

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

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

### PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam-613 403 Thanjavur 01. Define program? 02. What is program development cycle? 03. What is a programming language? 04. Define algorithm? 05. What

### Multiple Choice Questions ( 1 mark)

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

### Model Viva Questions for Programming in C lab

Model Viva Questions for Programming in C lab Title of the Practical: Assignment to prepare general algorithms and flow chart. Q1: What is a flowchart? A1: A flowchart is a diagram that shows a continuous

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

A3-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH 'C' LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be

### A Fast Review of C Essentials Part I

A Fast Review of C Essentials Part I Structural Programming by Z. Cihan TAYSI Outline Program development C Essentials Functions Variables & constants Names Formatting Comments Preprocessor Data types

### DETAILED SYLLABUS INTRODUCTION TO C LANGUAGE

COURSE TITLE C LANGUAGE DETAILED SYLLABUS SR.NO NAME OF CHAPTERS & DETAILS HOURS ALLOTTED 1 INTRODUCTION TO C LANGUAGE About C Language Advantages of C Language Disadvantages of C Language A Sample Program

### Computers Programming Course 5. Iulian Năstac

Computers Programming Course 5 Iulian Năstac Recap from previous course Classification of the programming languages High level (Ada, Pascal, Fortran, etc.) programming languages with strong abstraction

### UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

SIDDARTHA INSTITUTE OF SCIENCE AND TECHNOLOGY:: PUTTUR Siddharth Nagar, Narayanavanam Road 517583 QUESTION BANK (DESCRIPTIVE) Subject with Code : PROGRAMMING FOR PROBLEM SOLVING (18CS0501) Course & Branch

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

Questions Bank Sub:PIC(22228) Course Code:-EJ-2I ----------------------------------------------------------------------------------------------- Chapter:-1 (Overview of C Programming)(10 Marks) 1) State

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

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011 Lectures 1-22 Moaaz Siddiq Asad Ali Latest Mcqs MIDTERM EXAMINATION Spring 2010 Question No: 1 ( Marks: 1 ) - Please

### Code No: R Set No. 1

Code No: R05010106 Set No. 1 1. (a) Draw a Flowchart for the following The average score for 3 tests has to be greater than 80 for a candidate to qualify for the interview. Representing the conditional

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

C Language Part 1 (Minor modifications by the instructor) References C for Python Programmers, by Carl Burch, 2011. http://www.toves.org/books/cpy/ The C Programming Language. 2nd ed., Kernighan, Brian,

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

Fundamental of C Programming Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Q2. Write down the C statement to calculate percentage where three subjects English, hindi, maths

### 6.096 Introduction to C++ January (IAP) 2009

MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture

### C programming basics T3-1 -

C programming basics T3-1 - Outline 1. Introduction 2. Basic concepts 3. Functions 4. Data types 5. Control structures 6. Arrays and pointers 7. File management T3-2 - 3.1: Introduction T3-3 - Review of

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

I Internal Examination Sept. 2018 Class: - BCA I Subject: - Principles of Programming Lang. (BCA 104) MM: 40 Set: A Time: 1 ½ Hrs. [I]Very short answer questions (Max 40 words). (5 * 2 = 10) 1. What is

### VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR 603 203 FIRST SEMESTER B.E / B.Tech., (Common to all Branches) QUESTION BANK - GE 6151 COMPUTER PROGRAMMING UNIT I - INTRODUCTION Generation and

### IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW 1. What is a header file? Header file is a simple text file which contains prototypes of all in-built functions, predefined variables and symbolic constants.

### CS201 Some Important Definitions

CS201 Some Important Definitions For Viva Preparation 1. What is a program? A program is a precise sequence of steps to solve a particular problem. 2. What is a class? We write a C++ program using data

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

C introduction Variables Variables 1 / 14 Contents Variables Data types Variable I/O Variables 2 / 14 Usage Declaration: t y p e i d e n t i f i e r ; Assignment: i d e n t i f i e r = v a l u e ; Definition

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

Code: DC-05 Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100 NOTE: There are 11 Questions in all. Question 1 is compulsory and carries 16 marks. Answer to Q. 1. must be written in the space

### OBJECTIVE QUESTIONS: Choose the correct alternative:

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

### CS201- Introduction to Programming Current Quizzes

CS201- Introduction to Programming Current Quizzes Q.1 char name [] = Hello World ; In the above statement, a memory of characters will be allocated 13 11 12 (Ans) Q.2 A function is a block of statements

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

UNIT I - INTRODUCTION Generation and Classification of Computers- Basic Organization of a Computer Number System Binary Decimal Conversion Problems. Need for logical analysis and thinking Algorithm Pseudo

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

COMPUTER SCIENCE HIGHER SECONDARY FIRST YEAR VOLUME II - CHAPTER 10 PROBLEM SOLVING TECHNIQUES AND C PROGRAMMING 1,2,3 & 5 MARKS S.LAWRENCE CHRISTOPHER, M.C.A., B.Ed., LECTURER IN COMPUTER SCIENCE PONDICHERRY

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

Fundamental Data Types CSE 130: Introduction to Programming in C Stony Brook University Program Organization in C The C System C consists of several parts: The C language The preprocessor The compiler

### 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

Sample Test Paper-I Marks : 25 Time:1 Hrs. Q1. Attempt any THREE 09 Marks a) State four relational operators with meaning. b) State the use of break statement. c) What is constant? Give any two examples.

### BLM2031 Structured Programming. Zeyneb KURT

BLM2031 Structured Programming Zeyneb KURT 1 Contact Contact info office : D-219 e-mail zeynebkurt@gmail.com, zeyneb@ce.yildiz.edu.tr When to contact e-mail first, take an appointment What to expect help

### Dynamic Memory Allocation

Dynamic Memory Allocation The process of allocating memory at run time is known as dynamic memory allocation. C does not Inherently have this facility, there are four library routines known as memory management

### Contents. Preface. Introduction. Introduction to C Programming

c11fptoc.fm Page vii Saturday, March 23, 2013 4:15 PM Preface xv 1 Introduction 1 1.1 1.2 1.3 1.4 1.5 Introduction The C Programming Language C Standard Library C++ and Other C-Based Languages Typical

About Codefrux While the current trends around the world are based on the internet, mobile and its applications, we try to make the most out of it. As for us, we are a well established IT professionals

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

LESSON 5 ARITHMETIC DATA PROCESSING The arithmetic data types are the fundamental data types of the C language. They are called "arithmetic" because operations such as addition and multiplication can be

### Important Questions for Viva CPU

Important Questions for Viva CPU 1. List various components of a computer system. i. Input Unit ii. Output Unit iii. Central processing unit (Control Unit + Arithmetic and Logical Unit) iv. Storage Unit

Introductory Medical Device Prototyping Advanced C Programming Topics, http://saliterman.umn.edu/ Department of Biomedical Engineering, University of Minnesota Operations on Bits 1. Recall there are 8

### Fundamentals of Programming

Fundamentals of Programming Lecture 3 - Constants, Variables, Data Types, And Operations Lecturer : Ebrahim Jahandar Borrowed from lecturer notes by Omid Jafarinezhad Outline C Program Data types Variables

### Exam 3 Chapters 7 & 9

Exam 3 Chapters 7 & 9 CSC 2100-002/003 29 Mar 2017 Read through the entire test first BEFORE starting Put your name at the TOP of every page The test has 4 sections worth a total of 100 points o True/False

### Review of the C Programming Language for Principles of Operating Systems

Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights

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

wss Reg. No. : Question Paper Code : 37007 B.E./B.Tech. DEGREE EXAMINATION, JANUARY 2014. First Semester Civil Engineering GE 6151 COMPUTER PROGRAMMING (Common to all branches) (Regulation 2013) Time :

### UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . \$, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

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

( Word to PDF Converter - Unregistered ) http://www.word-to-pdf-converter.net FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING INTRODUCTION TO C UNIT IV Overview of C Constants, Variables and Data Types

### DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING PROGRAMMING TECHNIQUES I EE271

UNIVERSITY OF SWAZILAND FACULTY OF SCIENCE AND ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING MAIN EXAMINATION: 2015 TITLE OF PAPER: COURSE NUMBER: TIME ALLOWED: PROGRAMMING TECHNIQUES

### DEPARTMENT OF MATHS, MJ COLLEGE

T. Y. B.Sc. Mathematics MTH- 356 (A) : Programming in C Unit 1 : Basic Concepts Syllabus : Introduction, Character set, C token, Keywords, Constants, Variables, Data types, Symbolic constants, Over flow,

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

Student Name: (in Capital Letters) CSE 1311 Introduction to Programming for Engineers and Scientists Final Exam Fall 2013 1 1. If count is a properly defined integer variable, the following piece of code:

### Problem Solving and 'C' Programming

Problem Solving and 'C' Programming Targeted at: Entry Level Trainees Session 15: Files and Preprocessor Directives/Pointers 2007, Cognizant Technology Solutions. All Rights Reserved. The information contained

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

Department of Computer Science College of Engineering Boise State University September 11, 2017 1/16 1-dimensional Arrays Arrays can be statically declared in C, such as: int A [100]; The space for this

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

COMP26120: Pointers in C (2018/19) Lucas Cordeiro lucas.cordeiro@manchester.ac.uk Organisation Lucas Cordeiro (Senior Lecturer, FM Group) lucas.cordeiro@manchester.ac.uk Office: 2.44 Office hours: 10-11

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

today advanced data types (1) typedef. mon 23 sep 2002 homework #1 due today homework #2 out today quiz #1 next class 30-45 minutes long one page of notes topics: C advanced data types dynamic memory allocation

### Course organization. Course introduction ( Week 1)

Course organization Course introduction ( Week 1) Code editor: Emacs Part I: Introduction to C programming language (Week 2-9) Chapter 1: Overall Introduction (Week 1-3) Chapter 2: Types, operators and

### CS Programming In C

CS 24000 - Programming In C Week Two: Basic C Program Organization and Data Types Zhiyuan Li Department of Computer Science Purdue University, USA 2 int main() { } return 0; The Simplest C Program C programs

### Chapter 2 - Introduction to C Programming

Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers 2.4 Memory Concepts 2.5 Arithmetic

### Fundamental of Programming (C)

Borrowed from lecturer notes by Omid Jafarinezhad Fundamental of Programming (C) Lecturer: Vahid Khodabakhshi Lecture 3 Constants, Variables, Data Types, And Operations Department of Computer Engineering

### Review of the C Programming Language

Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the

### C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

C Programming C SYLLABUS COVERAGE Introduction to Programming Fundamentals in C Operators and Expressions Data types Input-Output Library Functions Control statements Function Storage class Pointer Pointer

### Advanced C Programming and Introduction to Data Structures

FYBCA Semester II (Advanced C Programming and Introduction to Data Structures) Question Bank Multiple Choice Questions Unit-1 1. Which operator is used with a pointer to access the value of the variable

CS6202 - PROGRAMMING & DATA STRUCTURES UNIT I Part - A 1. W hat are Keywords? Keywords are certain reserved words that have standard and pre-defined meaning in C. These keywords can be used only for their

### Computers Programming Course 6. Iulian Năstac

Computers Programming Course 6 Iulian Năstac Recap from previous course Data types four basic arithmetic type specifiers: char int float double void optional specifiers: signed, unsigned short long 2 Recap

### Lecture 03 Bits, Bytes and Data Types

Lecture 03 Bits, Bytes and Data Types Computer Languages A computer language is a language that is used to communicate with a machine. Like all languages, computer languages have syntax (form) and semantics

### Data Types. Data Types. Integer Types. Signed Integers

Data Types Data Types Dr. TGI Fernando 1 2 The fundamental building blocks of any programming language. What is a data type? A data type is a set of values and a set of operations define on these values.

### Fundamental of C programming. - Ompal Singh

Fundamental of C programming - Ompal Singh HISTORY OF C LANGUAGE IN 1960 ALGOL BY INTERNATIONAL COMMITTEE. IT WAS TOO GENERAL AND ABSTRUCT. IN 1963 CPL(COMBINED PROGRAMMING LANGUAGE) WAS DEVELOPED AT CAMBRIDGE

### Differentiate Between Keywords and Identifiers

History of C? Why we use C programming language Martin Richards developed a high-level computer language called BCPL in the year 1967. The intention was to develop a language for writing an operating system(os)

### Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

The Hyderabad Public School, Begumpet, Hyderabad, A.P. 500 016 2012-13 Department of Computer Science Class 8 Worksheet 3 1) How many times will the following statement execute? ( ) int a=5; while(a>6)

### 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:

Q1. Explain the structure of a C program Structure of the C program is shown below: Preprocessor Directives Global Declarations Int main (void) Local Declarations Statements Other functions as required

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

C Programming Language (Chapter 2 of K&R) Types, Operators and Expressions Variables and Constants Basic objects manipulated by programs Declare before use: type var1, var2, int x, y, _X, x11, buffer;

### Programming for Engineers Iteration

Programming for Engineers Iteration ICEN 200 Spring 2018 Prof. Dola Saha 1 Data type conversions Grade average example,-./0 class average = 23450-67 893/0298 Grade and number of students can be integers

CS201 Spring2009 Solved Sunday, 09 May 2010 14:57 MIDTERM EXAMINATION Spring 2009 CS201- Introduction to Programming Question No: 1 ( Marks: 1 ) - Please choose one The function of cin is To display message

### CSE 12 Spring 2018 Week One, Lecture Two

CSE 12 Spring 2018 Week One, Lecture Two Homework One and Two: - Introduction to C - Review of basic programming principles - Building from fgetc and fputc - Input and output strings and numbers - Introduction

### Q1. Multiple Choice Questions

Rayat Shikshan Sanstha s S. M. Joshi College, Hadapsar Pune-28 F.Y.B.C.A(Science) Basic C Programing QUESTION BANK Q1. Multiple Choice Questions 1. Diagramatic or symbolic representation of an algorithm

### Quiz 0 Review Session. October 13th, 2014

Quiz 0 Review Session October 13th, 2014 Topics (non-exhaustive) Binary. ASCII. Algorithms. Pseudocode. Source code. Compiler. Object code. Scratch. Statements. Boolean expressions. Conditions. Loops.

### Chapter 7. Basic Types

Chapter 7 Basic Types Dr. D. J. Jackson Lecture 7-1 Basic Types C s basic (built-in) types: Integer types, including long integers, short integers, and unsigned integers Floating types (float, double,

### A6-R3: DATA STRUCTURE THROUGH C LANGUAGE

A6-R3: DATA STRUCTURE THROUGH C LANGUAGE NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF

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

CHAPTER 1 Introduction to Computers and Programming 1 1.1 Why Program? 1 1.2 Computer Systems: Hardware and Software 2 1.3 Programs and Programming Languages 8 1.4 What is a Program Made of? 14 1.5 Input,

### C: How to Program. Week /Mar/05

1 C: How to Program Week 2 2007/Mar/05 Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers

### Model Viva Questions for Programming in C lab

Model Viva Questions for Programming in C lab Common to: CSE 2 nd sem IT 2 nd sem Title of the Practical: Assignment to prepare general algorithms and flow chart. Q1: What is a flowchart? A1: A flowchart

### CSE 30 Fall 2013 Final Exam

Login: cs30x Student ID Name Signature By filling in the above and signing my name, I confirm I will complete this exam with the utmost integrity and in accordance with the Policy on Integrity of Scholarship.

### Engineering Computing I

Engineering Computing I Types, Operators, and Expressions Types Operators Expressions 2 1 2.1 Variable Names Names are made up of letters and digits The first character must be a letter The underscore

### DECLARAING AND INITIALIZING POINTERS

DECLARAING AND INITIALIZING POINTERS Passing arguments Call by Address Introduction to Pointers Within the computer s memory, every stored data item occupies one or more contiguous memory cells (i.e.,

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

Q1. Define Algorithm with example? Answer:- A sequential solution of any program that written in human language, called algorithm. Algorithm is first step of the solution process, after the analysis of

### ET156 Introduction to C Programming

ET156 Introduction to C Programming g Unit 22 C Language Elements, Input/output functions, ARITHMETIC EXPRESSIONS AND LIBRARY FUNCTIONS Instructor : Stan Kong Email : skong@itt tech.edutech.edu General

### C mini reference. 5 Binary numbers 12

C mini reference Contents 1 Input/Output: stdio.h 2 1.1 int printf ( const char * format,... );......................... 2 1.2 int scanf ( const char * format,... );.......................... 2 1.3 char

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

Department of Computer Science College of Engineering Boise State University August 25, 2017 1/36 Pointers and Arrays A pointer is a variable that stores the address of another variable. Pointers are similar

### High Performance Computing in C and C++

High Performance Computing in C and C++ Rita Borgo Computer Science Department, Swansea University Summary Introduction to C Writing a simple C program Compiling a simple C program Running a simple C program

Come and join us at WebLyceum For Past Papers, Quiz, Assignments, GDBs, Video Lectures etc Go to http://www.weblyceum.com and click Register In Case of any Problem Contact Administrators Rana Muhammad

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

Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...

### Short Notes of CS201

#includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

### DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : I / II Section : CSE - 1 & 2 Subject Code : CS6202 Subject Name : Programming and Data Structures-I Degree & Branch : B.E C.S.E. 2 MARK