# GTU Questions. Computer Programming & Utilization. Chief Course Coordinator Prof. Mitul K.Patel. (Head of Department & Assistant Professor)

Save this PDF as:

Size: px
Start display at page:

Download "GTU Questions. Computer Programming & Utilization. Chief Course Coordinator Prof. Mitul K.Patel. (Head of Department & Assistant Professor)"

## Transcription

1 GTU Questions Computer Programming & Utilization Chief Course Coordinator Prof. Mitul K.Patel (Head of Department & Assistant Professor) Course Coordinator Prof. Vrutti D. Shah (Assistant Professor) Lab Coordinators Prof. Vrutti D.Shah (Assistant Professor) Prof. Vaibhav Patel(Lecturer) Prof. Disha T Goradia (Lecturer) Mr. Dharmendra Singh (Lecturer) Academic Year Shree Swami AtmanandSaraswati Institute of Technology Shree Swami Atmanand VidyaSankul, Kapodra, Varachha Road, Surat

2 Chapter-1 Introduction to computer and programming 1. Draw the Block diagram of Computer System and explain. 2. Explain the following terms in brief: Operating System, Compiler, Global Variable, Header Files 3. Explain various symbols used in Flowchart and draw the flowchart for finding Factorial of a number given by user. 1. What is software? List the various categories of software and their use. 2. What is flowchart? Draw a flowchart to print first N Fibonacci numbers. 3. Differentiate between compiler and interpreter. 4. Explain the C Development life cycle using flowchart in detail. 5. Draw a flowchart to count odd numbers and making their total from given N numbers. 6. What is Algorithm? 7. Explain various symbols used in Flowchart and draw the flowchart for finding smallest number out of three given numbers. 8. Draw the Block diagram of Computer System and explain. 9. Define: Software, Hardware, Higher level Language, Operating System. 10. Draw a flow chart to find factorial of a given number. 11. Name the major components of computer and give their function in brief.

3 Chapter-2 Fundamentals of C 1. Explain the primary data types used in C. 2. Explain various operators used in C language. 1. Explain the?: (ternary) and sizeof operators with proper examples. 2. What are the logical operators in C? List and explain them. 3. What do you mean by local and global variables? Give their scope and life time and compare them. 4. What are tri-graph characters? How are they useful? Explain any five of them 5. Explain the classification of operators in C in brief. 6. What is type conversion? Explain the type conversions supported by C Language. 7. Justify, C is middle level language. 8. Explain printf() and scanf() giving their syntex. 9. Explain switch case statement. 10. Explain various operators used in C language. 11. Data types in C. 12. Scope and Lifetime of Variable. 13. Explain implicit type conversion and explicit type conversion withexample. 14. Explain different operators used in C language. 15. Give the meaning and output of following C statements. a. x = 1,2,3; b. a = (b = 4, c = 5, b+c); c. if( x = 5) printf( x is even\ ); else printf( x is odd\n ); 16. Provide two major differences between a. Software and Hardware b. Flowchart and Algorithm 17. Write an algorithm and draw the flowchart to accept N numbers and count how many of them where odd and also compute sum of all these odd. 18. Explain the various I/O function with example in C.

4 19. Explain in brief the features of C language. 20. Explain logical operator and relational operator used in C language. 21. Draw a flow chart to find the smallest number out of three given numbers 22. Write a program to convert temperature entered by user from Fahrenheit into Celsius. 23. Explain the different data types of C language.

5 Chapter-3 Control Structures in C 1. Explain switch case statement with brief example. 2. Explain the difference between while and do..while statement. 3. Write a program to display following pattern using nested for loops For n lines. 4. Write a C program to check whether the given number is Prime or not. 5. Write short notes on following: (i) Nested if..else statement. (ii) Use of break and continue statement. 1. Explain the multiple (ladder) if-else with syntax and proper example. 2. Assume that you want to make the sum of 1 to 100. Give the necessary code to perform the same using (1) For loop (2) While loop (3) Do-while loop. 3. Explain the use of break and continue statement with example. 4. Write the basic differences between the while loop and do-while loop with suitable example. 5. How can you define infinite loop using while? 6. What is looping? Explain different types of loops in C and compare them. 7. Show how to sum 1 to 10 using each of these loops. 8. Write a program in C to generate Fibonacci series like following: 9. 1, 1, 2, 3, 5, 8, Generate 20 such numbers. 11. Write a program to display following pattern using nested for loops. * * * * * * * * * * 12. Write a program to accept three number from user and print maximum number. 13. Explain if else if..ladder with flowchart. 14. Explain for loop. Differentiate use of continue, break and go to statement.

6 15. Write a program to print following pattern using loop statement for n row Explain operator precedence and associativity. 17. What is infinite loop in C? How can you create it? Give an example of situation where you need to use infinite loop? 18. Write a C program to display the following triangle for N lines. 1 A B A B C D Write a C program to display the following triangle for N lines. 1 A B C D E F Explain if else if ladder of C with neat diagram and a brief program code 21. Compare for loop and while loop with illustration. 22. Write a program to generate Fibonacci series of numbers (total 20 numbers) 23. Write a C Program to check whether the given number is prime or not.

7 Chapter-4 Array & String 1. What is String? Explain any four string handling functions in C. 2. Write a C program to read 10 numbers from user and store them in an Array. Display Sum, Minimum and Average of the numbers. 3. Write a C program to Multiply two 3 X 3 Matrix. Read Two matrices from the user. 1. Write a program to find the minimum value from the array of 3x3 2. Write a program which accepts a long string and print only characters at positions which are multiple of Explain the storage class specifiers in C. 4. Explain getchar() and gets() functions with suitable example. 5. Explain putchar() and puts() functions with suitable example. 6. List the advantages and limitations of Array in C. 7. Define an array of 10 integer pointers. 8. Write a C program to accept a string and print every third character from string only if it is lower case. 9. Define an array of structure with integer, string and float as members. Size of array is Write a program to find maximum element from 3 3 metrics. 11. Explain how string is defined in C. Write user defined functions for the following: (i) strlen() : to find length of string. (ii) strcat() : to concate two strings. 12. Write a C program to Add two 3 X 3 Matrix. 13. Write a C program to read 10 numbers from user and find Sum, Maximum andaverage of them. 14. Write a program which declares array of 10 integers, enter the data and small the elements which are even. Also find the maximum number from them. 15. Explain strcat( ), strcpy( ),strncmp( ) and strstr( ) string manipulation function. 16. Write a C program to reverse a string given from keyboard. Don t use library function to reverse it. 17. Write a C program to accept array of N integers and find the largest odd number as well as largest even number and display them.

8 18. What is a string? How string is stored in C? Give the various functions with their use for string processing. 19. Write a program to store 10 numbers in an array. Then find out Sum, Maximum andaverage of these 10 numbers. 20. Explain following string manipulation functions. strcmp(), strlen(), strcat(), strstr() ;

9 Chapter-5 Functions 1. Write a short note on Categories of Functions. 1. What is function? Explain the function definition, function prototype and function call with example. 2. What is call by value? Clear it with example. 3. Write a function which accepts a string and returns the length of the string. 4. Write a C program in which a 5 digit positive integer is entered throughkeyboard; write a function to calculate the sum of digits of the 5 digit numberwith using recursion. 5. Explain the various types of function calls in C. 6. Give a prototype of function accepting an integer pointer and a float as arguments and returns nothing. 7. Write a C function to exchange two numbers and use it to reverse an arrayof 10 integers accepted from user. 8. What is recursion? Explain it with suitable example. 9. What is used defined function? Explain types of functions with example. 10. Write a function which receives number as argument and return sum ofdigit of that number. 11. Which are various categories of functions? Explain any one with example. 12. List out the categories of functions of C. Explain any one category with example.

10 Chapter-6 Pointers 1. What is Pointer in C? Explain its advantages. Also write a function to do swapping of two elements using pointer. Call this function in main(). 1. What is pointer? Clear it with examples and give its use. 2. Show the use of the malloc() function. 3. Explain Dynamic Memory Allocation functions with syntax. 4. Give the meaning of a. int (*f)(int,int) ; b. int *f(int,int); 5. How can you allocate memory dynamically for 10 floating point numbers? 6. Write short note on Pointer. 7. What is dynamic memory allocation? What is difference between malloc and calloc? 8. What is a pointer? Write a program using pointer to read in an array of integers and print its elements in reverse order. 9. Explain the following with proper syntax and examples. 10. Pointers in C 2. Call by value Vs. Call by reference 11. What is pointer? Give its benefits. Write a program to do swapping of two elementsusing function with two pointers as arguments.

11 Chapter-7 Structure and Union 1. What is structure in C? Define a structure named Student with roll_no, name and percentage as members. Read data of 5 students from user and display them in proper format. 12. Define the union. 13. What is structure? Define the structure and explain how to access the structure members. 14. Differentiate Structures and Unions with example. 15. Explain the various ways to access the structure members with proper syntaxin C language. 16. What is structure? How can we access structure members? Clear use of nested structure using example. Compare structure with union. 17. What is structure? Explain with example how to declare a structure and how toinitialize it. 18. State difference between Structure and Union. 19. State the difference between Structure and Union. 20. What is structure? How do we declare and access structure variables?

12 Chapter-8 File 1. Write short notes on File Operations in C. 1. What is file management? List the different file management functions and explain the various file modes. 2. Write a program to display the contents of a given file. 3. List the various in-built string functions. 4. Write short notes on following. (i) File Operations in C. `

### SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK (2110003) [F.Y.B.E.

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR ODD/EVEN ACADEMICSEMESTER (2014-15) ASSIGNMENT / QUESTION BANK Subject: Computer Programming and Utilization (2110003) [F.Y.B.E.: ALL BRANCHES] Unit 1

### VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

### BHARATHIAR UNIVERSITY: COIMBATORE CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++ LANGUAGE

Certificate in Advanced Programming - C++ Language Page 1 of 7 BHARATHIAR UNIVERSITY: COIMBATORE 641046 CENTRE FOR COLLABORATION OF INDUSTRY AND INSTITUTIONS(CCII) CERTIFICATE IN ADVANCED PROGRAMMING C++

### Fundamentals of Computer & Programming in C Short-answer type questions

Fundamentals of Computer & Programming in C Short-answer type questions Section- A i. What is a computer system? Draw the block diagram of computer. ii. Differentiate between Real Time Operating System

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

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE NOTE: IMPORTANT INSTRUCTIONS: 1. Question Paper in English and Hindi and Candidate can choose any one language. 2. In case of discrepancies in

### UNIT-1 PART-A UNIT-2 PART-A

UNIT-1 1. Define computer? 2. Discuss briefly about input and output devices? 3. What is a RAM? 4. What is arom? 5. What is a compiler? 6. Write about a linker? 7. List any 5 key wordsof c? 8. Illustrate

### FBCA-02 April-2007 Programming in C Language BCA-102 (New Course)

Seat No. : FBCA-02 April-2007 Programming in C Language BCA-102 (New Course) Time : 3 Hours] [Max. Marks : 70 Instructions : (1) Figures to the right indicate full marks of the question. (2) Make and state

### 1. Constants. 2. Variables. 3. Reserved words or key words. 4. Constants. Character set in C

Character set in C We should use only the following characters in writing a C program. These characters can be combined to create C words. Alphabet: A, B, C, D.. Z, a, b, c, d..z Numeric digits: 0, 1,

Marathwada Institute of Technology Master of Computer Application Title of the subject: Object Oriented Programming using C++ Course Code: MCA 101 Faculty: Shubhashree Savant Class: FY MCA Part - I (Question

### I PUC - Computer Science. Practical s Syllabus. Contents

I PUC - Computer Science Practical s Syllabus Contents Topics 1 Overview Of a Computer 1.1 Introduction 1.2 Functional Components of a computer (Working of each unit) 1.3 Evolution Of Computers 1.4 Generations

### MLR Institute of Technology

MLR Institute of Technology DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING Computer Programming Lab List of Experiments S.No. Program Category List of Programs 1 Operators a) Write a C program

### MIT Aurangabad FE Computer Engineering

MIT Aurangabad FE Computer Engineering Unit 1: Introduction to C 1. The symbol # is called a. Header file c. include b. Preprocessor d. semicolon 2. The size of integer number is limited to a. -32768 to

### B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011

NEW Detailed Syllabus of B.Sc.(Computer Science) and B.Sc.(IT) Effective From July 2011 SEMESTER SYSTEM Scheme & Syllabus for B.Sc. (CS) Pass and Hons. Course Effective from July 2011 and onwards CLASS

### 2013 Five years Integrated M.Sc.(IT) Semester 1 060010101 - Fundamentals of Programming

03 Five years Integrated M.Sc.(IT) Semester 00000 - Fundamentals Programming File should contain. Problem Statement. Algorithm 3. Flowchart. Program in C language(code) 5. Output and sample calculation

### C programming: exercise sheet L2-STUE (2011-2012)

C programming: exercise sheet L2-STUE (2011-2012) Algorithms and Flowcharts Exercise 1: comparison Write the flowchart and associated algorithm that compare two numbers a and b. Exercise 2: 2 nd order

### Sources: On the Web: Slides will be available on:

C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

### AFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING

Sp2 AFF 826 Sub. Code 4BSO1C1 B.Sc. DEGREE EXAMINATION, NOVEMBER 2015 First Semester Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING (CBCS 2014 onwards) Time : 3 Hours Maximum : 75 Marks Part A (10

### Going from Python to C

Going from Python to C Darin Brezeale December 8, 2011 Python is a high-level, interpreted language. C has many of the same types of programming constructs as in Python: arrays, loops, conditionals, functions,

### Final Exam Review. CS 1428 Fall Jill Seaman. Final Exam

Final Exam Review CS 1428 Fall 2011 Jill Seaman 1 Final Exam Friday, December 9, 11:00am to 1:30pm Derr 241 (here) Closed book, closed notes, clean desk Comprehensive (covers entire course) 25% of your

### 1) String initialization can be carried out in the following ways, similar to that of an array :

Strings in C : Overview : String data type is not supported in C Programming. String is essentially a collection of characters to form particular word. String is useful whenever we accept name of the person,

### The C Programming Language course syllabus associate level

TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

### Course learning outcomes

UCS130C/UCS230C COMPUTER CONCEPTS & C PROGRAMMING 4 CREDITS Hrs/Week :04 Total Hrs:48 CIE Marks:50 SEE Marks:50 Course learning outcomes At the end of the course student will be able to: 1. Identify the

### KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

### Tutorial No. 8 - Solution (Strings and User Defined Functions)

Tutorial No. 8 - Solution (Strings and User Defined Functions) 1. Explain strcat( ), strcpy( ),strncmp( ) and strstr( ) string manipulation function. [6] strcat() Function: The strcat function joins two

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

### Bhakta Kavi Narsinh Mehta University, Junagadh

Bhakta Kavi Narsinh Mehta University, Junagadh Draft Syllabus for B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester - 1) Effective From June - 2016 B.Sc. (C.S.) (Semester - 1) CS-101:

### Introduction to C Programming S Y STEMS

Introduction to C Programming CS 40: INTRODUCTION TO U NIX A ND L I NUX O P E R AT ING S Y STEMS Objectives Introduce C programming, including what it is and what it contains, which includes: Command line

### Standard printing function in C is printf Prints everything numbers, strings, etc. May be complex to use. Standard C library is called libc

Arrays and Structs and Pointers, Oh My! Programming in C Input and output Using printf Standard input and output Pointers Arrays Structures Combining these things together Arrays and Structs and Pointers,

### OUTCOMES BASED LEARNING MATRIX

Course: CTIM371 Programming in C++ OUTCOMES BASED LEARNING MATRIX Department: Computer Technology and Information Management Course Description: This is the first course in the C++ programming language.

### ASCII Encoding. The char Type. Manipulating Characters. Manipulating Characters

The char Type ASCII Encoding The C char type stores small integers. It is usually 8 bits. char variables guaranteed to be able to hold integers 0.. +127. char variables mostly used to store characters

### Programming for MSc Part I

Herbert Martin Dietze University of Buckingham herbert@the-little-red-haired-girl.org July 24, 2001 Abstract The course introduces the C programming language and fundamental software development techniques.

### COMPUTER PROGRAMMING THROUGH C LAB MANUAL

LAB MANUAL Name Roll No. Branch Section INDEX S. No Contents 1 Objectives of the lab 2 Requirements 3 Lab Syllabus Programs (JNTU) 4 Introduction About Lab 5 Solutions for Programs 6 Topics beyond the

### PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

### Characters and Strings. Constants

Characters and Strings Constants Characters are the fundamental building blocks of source programs Character constants One character surrounded by single quotes A or? Actually an int value represented

### G & A - IV - J U.O.No. Dated, Calicut University.P.O, 14.09.2015

File Ref.No.72742/GA - IV - J1/2014/Admn UNIVERSITY OF CALICUT Abstract BVoc programme in Software Development- under Modified BVoc Regulations 2014 Question Bank for 1st and 2nd Semester- implemented

### C++ Programming Language

C++ Programming Language Lecturer: Yuri Nefedov 7th and 8th semesters Lectures: 34 hours (7th semester); 32 hours (8th semester). Seminars: 34 hours (7th semester); 32 hours (8th semester). Course abstract

### Branching. We ll continue to look at the basics of writing C++ programs including. Overview

Branching Overview We ll continue to look at the basics of writing C++ programs including Boolean Expressions (need to know this before we can using branching and looping!) Branching J.S. Bradbury CSCI

### 6.087 Lecture 5 January 15, 2010

6.087 Lecture 5 January 15, 2010 Review Pointers and Memory Addresses Physical and Virtual Memory Addressing and Indirection Functions with Multiple Outputs Arrays and Pointer Arithmetic Strings String

### 12 INPUT AND OUTPUT OF DATA

12 INPUT AND OUTPUT OF DATA 12.1 INTRODUCTION In C language input and output of data is done by a collection of library functions like getchar, putchar, scanf, printf, gets and puts. These functions permit

### PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore

PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore 560 100 Department of MCA COURSE INFORMATION SHEET 1. GENERAL INFORMATION: Problem Solving Using C (13MCA11) Academic Year:

### 3) Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

Freshers Club Important 100 C Interview Questions & Answers 1) How do you construct an increment statement or decrement statement in C? There are actually two ways you can do this. One is to use the increment

### CSI 333 Lecture 2 Introduction to C: Part I 2 1 / 16

CSI 333 Lecture 2 Introduction to C: Part I 2 1 / 16 Basics of C Remark: Skim Chapters 1 through 6 of Deitel & Deitel. You will notice the following: C is (more or less) a subset of Java. (So, you are

### PE1 Worksheet. 3) What are the three control structures for writing an algorithm in pseudocode?

PE1 Worksheet Problem solving 1) What are the four stages of problem solving by programming? What shall be done in each stage? Stage 1: Stage 2: Stage 3: Stage 4: 2) What is the top-down design strategy

### C Programming, Chapter 1: C vs. Java, Types, Reading and Writing

C Programming, Chapter 1: C vs. Java, Types, Reading and Writing T. Karvi August 2013 T. Karvi C Programming, Chapter 1: C vs. Java, Types, Reading and Writing August 2013 1 / 1 C and Java I Although the

### MPATE-GE 2618: C Programming for Music Technology. Unit 1.3

MPATE-GE 2618: C Programming for Music Technology Unit 1.3 More operators e ++ and -- are increment and decrement operators ++i or i++ is equivalent to i = i + 1; --i or i-- is equivalent to i = i - 1;

### Programming. MRS.ANURADHA BHATIA M.E. Computer Engineering MSBTE G-SCHEME

Software Engineering MSBTE 2. Project Scheduling G-SCHEME 2015-2016 Programming in C FIRST YEAR SUBJECT CODE 17212 COMPUTER TECHNOLOGY COMPUTER ENGINEERING INFORMATION TECHNOLOGY MRS.ANURADHA BHATIA M.E.

### UNIT III: 1. What is an array? How to declare and initialize arrays? Explain with examples

UNIT III: Arrays: Introduction, One-dimensional arrays, Declaring and Initializing arrays, Multidimensional arrays. Strings: Introduction to Strings, String operations with and without using String handling

### 6.096 Lab 1. Due: 7 January 12:30:00. September 20, 2011

6.096 Lab 1 Due: 7 January 1:30:00 September 0, 011 1 Additional Material 1.1 Constants A constant is an expressions with a fixed value. Kinds of constants: Literals: used to express particular values

### Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

### FORM 1 (Please put your name, section # (10am- 001/2pm-002, and form # on the scantron!!!!) CS 161 Exam I:

FORM 1 (Please put your name, section # (10am- 001/2pm-002, and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each): 1. The following statement is legal: cout >> Hello, my name is

### Basic C Syntax. Comp-206 : Introduction to Software Systems Lecture 10. Alexandre Denault Computer Science McGill University Fall 2006

Basic C Syntax Comp-206 : Introduction to Software Systems Lecture 10 Alexandre Denault Computer Science McGill University Fall 2006 Next Week I'm away for the week. I'll still check my mails though. No

### GETTING STARTED WITH C++ C++ BASICS - 1 -

- 1 - GETTING STARTED WITH C++ Programming is a core activity in the process of performing tasks or solving problems with the aid of a computer. An idealised picture is: PROBLEM COMPUTER SOLUTION Unfortunately

### Reading. C Programming Language. Basic syntax Whitespaces. Whitespaces (cont d) #include. Basic syntax Comments

Reading C Programming Language Types, operators, expressions Control flow, functions Basic IO K&R Chapter 2 Types, Operators, and Expressions K&R Chapter 3 Control Flow K&R Chapter 7 Basic I/O NEWS Assignment

### C Programming Dr. Hasan Demirel

C How to Program, H. M. Deitel and P. J. Deitel, Prentice Hall, 5 th edition (3 rd edition or above is also OK). Introduction to C Programming Dr. Hasan Demirel Programming Languages There are three types

### Strings in C++ and Java. Questions:

Strings in C++ and Java Questions: 1 1. What kind of access control is achieved by the access control modifier protected? 2 2. There is a slight difference between how protected works in C++ and how it

### C Programming Strings. Mrs. Hajah T. Sueno, MSIT instructor

C Programming Strings Mrs. Hajah T. Sueno, MSIT instructor String Basics 3 Characters Characters are small integers (0-255) Character constants are integers that represent corresponding characters. 0 48

### INDEX. C programming Page 1 of 10. 5) Function. 1) Introduction to C Programming

INDEX 1) Introduction to C Programming a. What is C? b. Getting started with C 2) Data Types, Variables, Constants a. Constants, Variables and Keywords b. Types of Variables c. C Keyword d. Types of C

### The char Data Type. Character and String Processing. Another Example /* Capitalize all lowercase letters */ while ((c = getchar())!

Character and String Processing CSE 130: Introduction to C Programming Spring 2005 The char Data Type A char value can be thought of as either a character or a small integer printf( %d, a ); /* prints

### Model Paper Computer Science Objective. Paper Code Time Allowed: 20 minutes

Note: This is Model Paper for guidance of students & teachers. Q. Model Paper Computer Science Objective Intermediate Part II ( th Class) Examination Session -4 and onward Total marks: 7 Paper Code Time

### Pseudocode. Pseudocode. Guide for Pseudocode. Computers in Engineering Pseudocode and C Language Review. Example Pseudocode.

Computers in Engineering Pseudocode and C Language Review Pseudocode Pseudocode is an artificial and informal language that helps you develop algorithms Pseudocode is similar to everyday English; it is

### 3/13/2012. Esc101: Strings. String input and output. Array of characters: String

Esc101: Strings Instructor: Krithika Venkataramani Semester 2, 2011-2012 The contents of most of these slides are from the lecture slides of Prof. Arnab Bhattacharya 1 2 Array of characters: String String

### C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

C Programming for Embedded Microcontrollers Warwick A. Smith Elektor International Media BV Postbus 11 6114ZG Susteren The Netherlands 3 the Table of Contents Introduction 11 Target Audience 11 What is

### 1. A(n) structure is a logical design that controls the order in which a set of statements execute. a. function b. control c. sequence d.

Chapter Four MULTIPLE CHOICE 1. A(n) structure is a logical design that controls the order in which a set of statements execute. a. function b. control c. sequence d. iteration 2. The decision structure

### Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is preceded by an equal sign d. its name has undereline 2. Associations

### UNIT-1. C Programming & Data Structures. Introduction to Computers: Computing Environment: Types of Computing Environments:

Introduction to Computers: C Programming & Data Structures UNIT-1 A computer system consists of hardware and software. Computer hardware is the collection of physical elements that comprise a computer

### Common Errors in C. David Chisnall. February 15, 2011

Common Errors in C David Chisnall February 15, 2011 The C Preprocessor Runs before parsing Allows some metaprogramming Preprocessor Macros Are Not Functions The preprocessor performs token substitution

### ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical

### MGM s JNEC Question Bank Subject: Computer Engineering

MGM s JNEC Question Bank Subject: Computer Engineering 1. All of the following are examples of computer input units EXCEPT: a) Scanner b) Speaker c) Bar code reader d) Keyboard Answer: b 2. Which of the

Reading and writing strings Reading and Writing String Reading Format conversion %s can be used in scanf for reading strings not containing white spaces: scanf("%s", str) & not required before str as it

### INTRODUCTION TO FLOWCHARTING

CHAPTER 1 INTRODUCTION TO FLOWCHARTING 1.0 Objectives 1.1 Introduction 1.2 Flowcharts 1.3 Types of Flowcharts 1.3.1 Types of flowchart 1.3.2 System flowcharts 1.4 Flowchart Symbols 1.5 Advantages of Flowcharts

### z = x + y * z / 4 % 2-1

1.Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1? A. rem = 3.14 % 2.1; B. rem = modf(3.14, 2.1); C. rem = fmod(3.14, 2.1); D. Remainder cannot be obtain

### Control structures in C

Control structures in C Lecture Topics Conditional constructs Iterative constructs Examples Style Lecture materials Textbook 13.3-13.5 Homework None Machine problem MP1.1 due February 2 at 5pm submitted

### C Programming 1. C Programming

C Programming 1 1 C Programming 1. Who developed the C language? Dennis M.Ritchie in 1972 2. What type of language is C? Semi-high level language 3. What is main()? The main() is a special function used

### Indicates the end of data when the number of data is not known in advance Must be distinct from the data but be of the same type

Program Control Essentials of repetition Loop control variable Counts the number of repetitions in the counter-controlled loop Controls the execution of loop Sentinel value Indicates the end of data when

### Fundamentals of Programming and Software Development Lesson Objectives

Lesson Unit 1: INTRODUCTION TO COMPUTERS Computer History Create a timeline illustrating the most significant contributions to computing technology Describe the history and evolution of the computer Identify

### A Rudimentary Intro to C programming

A Rudimentary Intro to C programming Wayne Goddard School of Computing, Clemson University, 2008 Part 4: Strings and Pointers 18 Strings.................................... D1 19 String Functions..............................

### Embedded C Programming, Linux, and Vxworks. Synopsis

Embedded C Programming, Linux, and Vxworks. Synopsis This course is extensive and contains many advanced concepts. The range of modules covers a full introduction to C, real-time and embedded systems concepts

### The American University in Cairo Computer Science & Engineering Department CSCE 106 Fundamentals of Computer Science

Dr. KHALIL The American University in Cairo Computer Science & Engineering Department CSCE 106 Fundamentals of Computer Science Problem Solving & Assignment (2) Programming in C++ Group 1 Write a C++ program

### Chapter One Introduction to Programming

Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

### Stacks. Linear data structures

Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations

### 3/13/2012. ESc101: Multiple statement execution using loops. Loops are used when instructions are repeated. while statement can be used for a loop

ESc101: Multiple statement execution using loops Instructor: Krithika Venkataramani Semester 2, 2011-2012 The content of most of these slides are taken from the lecture slides of Prof. Arnab Bhattacharya

### Punctuation in C. Identifiers and Expressions. Identifiers. Variables. Keywords. Identifier Examples

Identifiers and Expressions CSE 130: Introduction to C Programming Spring 2005 Punctuation in C Statements are terminated with a ; Groups of statements are enclosed by curly braces: { and } Commas separate

### El Dorado Union High School District Educational Services

El Dorado Union High School District Course of Study Information Page Course Title: ACE Computer Programming I (#494) Rationale: A continuum of courses, including advanced classes in technology is needed.

### C Primer. Fall Introduction C vs. Java... 1

CS 33 Intro Computer Systems Doeppner C Primer Fall 2016 Contents 1 Introduction 1 1.1 C vs. Java.......................................... 1 2 Functions 1 2.1 The main() Function....................................

### Programming Assignments

Programming Assignments 1. A number is called an Armstrong number if the sum of the cubes of the digits of the number is equal to the number. For example 153 = 1^3 + 5^3 + 3^3. Write a C program that asks

### The if-statement. Simple and compound statements. The if-statement comes in two forms: Simple statements:

1 2 Simple and compound s The if- Simple s: E.g.: expression; Various jumps : break, goto, continue, return. k = a * p + 3; printf("k = %d\n", k); 1 + 2; ; The if- comes in two forms: or E.g.: if (expression)

### Chapter 18 I/O in C. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 18 I/O in C Standard C Library I/O commands are not included as part of the C language. Instead, they are part of the Standard C Library. A collection of functions and macros that must be implemented

### C programming. Intro to syntax & basic operations

C programming Intro to syntax & basic operations Example 1: simple calculation with I/O Program, line by line Line 1: preprocessor directive; used to incorporate code from existing library not actually

### Repetition and Loops. Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed.

New Topic Repetition and Loops Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed. These constructs are the 1. while loop and

### 9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

9 Control Statements 9.1 Introduction The normal flow of execution in a high level language is sequential, i.e., each statement is executed in the order of its appearance in the program. However, depending

### Programming Fundamental. Instructor Name: Lecture-2

Programming Fundamental Instructor Name: Lecture-2 Today s Lecture What is Programming? First C++ Program Programming Errors Variables in C++ Primitive Data Types in C++ Operators in C++ Operators Precedence

### Curriculum Map. Discipline: Computer Science Course: C++

Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code

### Two-way selection. Branching and Looping

Control Structures: are those statements that decide the order in which individual statements or instructions of a program are executed or evaluated. Control Structures are broadly classified into: 1.

### 6.087 Lecture 3 January 13, 2010

6.087 Lecture 3 January 13, 2010 Review Blocks and Compound Statements Control Flow Conditional Statements Loops Functions Modular Programming Variable Scope Static Variables Register Variables 1 Review:

### STRINGS. PREPAED BY T.DEVI IT DEPARTMENT Vidya Jyothi Institute of Technology. Hyderabad

STRINGS PREPAED BY T.DEVI IT DEPARTMENT Vidya Jyothi Institute of Technology. Hyderabad Definition Array of character are called strings. A string is terminated by null character /0. For example: "Vjit