For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

Size: px
Start display at page:

Download "For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit"

Transcription

1

2 For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

3 For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

4 1 a. What are data types? Mention the different data types supported by C language, giving an example to each. (5 Marks) 1 b. Write a C program which takes as input p, t, r. Compute the simple interest and display the result. (5 Marks) 1

5 1 c. What is an operator? List and explain various types of operators. (10 Marks) 2

6 3

7 2 a. What is a token? What are the different types of tokens available in C language? Explain. (08 Marks) 4

8 2 b. Write C expressions corresponding to the following (Assume all quantities are of same type) (06 Marks) 2 c. What is the value of x in the following code segments? Justify your answers: (06 Marks) 5

9 3 a. What are the different types of conditional decision making statements? Explain each with example. (10 Marks) 6

10 7

11 8

12 3 b. Write a C program to simulate simple calculator that performs arithmetic operations using switch statements. Error message should be displayed, if any attempt is to made to divide by zero. (10 Marks) 9

13 4 a. Explain with example formatted input output statements in C. (06 Marks) 10

14 4 b. List four differences between while loop and do-while loop along with syntax and example. (06 Marks) 11

15 4 c. Design and develop a C program to reverse a given four digit integer number and check whether it is a palindrome or not. (08 Marks) 12

16 5 a. What is an array? Explain different methods of initialization of single dimensional arrays. (06 Marks) 13

17 14

18 5 b. Write a C program to read N integers into an array A and to i) find the sum of odd numbers ii) find the sum of even numbers iii) find the average of all numbers Output the results computed with appropriate headings. (06 Marks) 15

19 5 c. How string is declared and initialized? Explain any FOUR string manipulation functions with examples. (08 Marks) 16

20 17

21 6 a. Explain function call, function definition and function prototype with examples to each. (06 Marks) 18

22 6 b. What are actual parameters and formal parameters? Illustrate with example. (06 Marks) 6 c. What is recursion? Write a C program to compute the factorial of a given number n using recursion. (08 Marks) 19

23 7 a. How structure is different from an array? Explain declaration of a structure with an example. (06 Marks) 20

24 7 b. Explain with an example, how to create a structure using typedef. (04 Marks) 21

25 7 c. Write a C program to input the following details of N students using structure: Roll No: integer, name: string, marks: float, grade: char Print the names of the students with marks >= 60.0%. (10 Marks) 22

26 8 a. Explain following file operations along with syntax and examples: i)fopen() ii)fclose() iii)fscanf() iv) fprintf() v)fgets(). (10 Marks) 23

27 8 b. Write a C program to read the contents from the file called abc: text, count the number of characters, number of lines and number of white spaces and output the same. (10 Marks) 24

28 8 a. Define pointer variable. Explain with an example, the declaration and initialization of pointer variable. (06 Marks) 25

29 8 b. Explain following C functions along with syntax and example to each. i) malloc() ii) calloc() iii) realloc iv) free() (08 Marks) 26

30 8 c. Develop a C program to read two numbers and function to swap these numbers using pointers. (06 Marks) 27

31 10. Write short notes on following: a. Preprocessor directives b. Primitive and non primitive data types c. Stack operations d. Types of queues. (20 Marks) a) 28

32 b) c) 29

33 d) 30

34 For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

35 For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

36 For Solved Question Papers of UGC-NET/GATE/SET/PGCET in Computer Science, visit

37 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Explain the structure of C program with example. (5 Marks) 1

38 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC b. Explain scanf() and printf() function in C language with syntax and examples. (5 Marks) For answer, refer Solved Paper June-2015 Q.No.4a. 1 c. Write a C program to find area of circle. (5 Marks) 2 a. What is an algorithm? Write an algorithm to find largest of 3 numbers. (5 Marks) 2

39 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC b. Explain the following operators in C language. i) Relational ii) Conditional iii) Logical (5 Marks) 3

40 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC c. What is an identifier? Give any 5 rules that are to be followed while declaring a variable. (4 Marks) 4

41 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Explain the ELSE IF ladder with syntax and example. (8 Marks) 5

42 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC b. List the types of loops. Explain the working of any one type of loop with syntax and example. (8 Marks) 6

43 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC b. Write a program to read a year as an input and find whether it is a LEAP YEAR or not (8 Marks) 7

44 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Explain SWITCH statement, with syntax and example. (8 Marks) 4 b. Differentiate between WHILE and DO-WHILE loops. (6 Marks) For answer, refer Solved Paper June-2015 Q.No.4b. 4 c. Write a program to find reverse of a number and check whether it is a PALINDROME or not (6 Marks) For answer, refer Solved Paper June-2015 Q.No.4c. 8

45 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. What is an ARRAY? Explain the different ways of initializing an array with examples. (7 Marks) For answer, refer Solved Paper June-2015 Q.No.5a. 5 b. What are the advantages of using User defined functions. (6 Marks) 9

46 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC c. Write a program to read a sentence and print the frequencies of each VOWEL and total count of CONSONANTS. (7 Marks) 10

47 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Explain the different types of arrays, with syntax and examples. (7 Marks) 11

48 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC b. Explain any 4 string manipulating functions with examples. (8 Marks) 12

49 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC

50 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC c. Define the following: i) Actual parameter ii) Formal parameter iii) Global variable (external variable) iv) Local variable (automatic variable) (5 Marks) 7 a. Define a STRUCTURE. Explain structure with syntax and example. (5 Marks) For answer, refer Solved Paper June-2015 Q.No.7a. 14

51 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC b. What is a FILE? Explain any 2 FILE functions, with example. (5 Marks) 7 c. Write a program to maintain a record 0f n student details using an array of structures with four fields (Roll number, Name, Marks, and Grade). Each field is of a appropriate data type. Print the marks of the students based on the student name as input (10 Marks) For answer, refer Solved Paper June-2015 Q.No.7c. 15

52 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Differntiate between STRUCTURES and UNIONS. (5 Marks) 8 b. Explain the various MODES in which a FILE can be created successfully. (5 Marks) 16

53 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC c. Given 2 university information files student.txt and usn.txt that contains students Name and USN respectively. Write a program to create a new file called output.txt and copy and contents of files studentname.txt and usn.txt into output file in the sequence shown below. (10 Marks) 17

54 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Define a POINTER. Explain how pointer variable is declared and initialized. (6 Marks) For answer, refer Solved Paper June-2015 Q.No.9a. 9 b. What are primitive and non-primitive data types? Give examples. (6 Marks) For answer, refer Solved Paper June-2015 Q.No.10b. 9 c. Write a program using pointers to compute sum, mean and standard deviation of all elements stored in an array of n real numbers. (8 Marks) 18

55 PROGRAMMING IN C & DATA STRUCTURES SOLVED PAPER DEC a. Explain any 2 pre-processor directives in C language. (5 Marks) For answer, refer Solved Paper June-2015 Q.No.10a. 10 b. What is a STACK? Explain its applications. (5 Marks) 10 c. What is a QUEUE? Explain with example. (5 Marks) 10 d. Write a program to swap 2 numbers using call-by-refernce method. (5 Marks) For answer, refer Solved Paper June-2015 Q.No.9c. 19

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

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.

More information

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

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

More information

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

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

More information

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

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

More information

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

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

More information

Advanced C Programming and Introduction to Data Structures

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

More information

KLiC C Programming. (KLiC Certificate in C Programming)

KLiC C Programming. (KLiC Certificate in C Programming) KLiC C Programming (KLiC Certificate in C Programming) Turbo C Skills: The C Character Set, Constants, Variables and Keywords, Types of C Constants, Types of C Variables, C Keywords, Receiving Input, Integer

More information

PROGRAMMING IN C AND C++:

PROGRAMMING IN C AND C++: PROGRAMMING IN C AND C++: Week 1 1. Introductions 2. Using Dos commands, make a directory: C:\users\YearOfJoining\Sectionx\USERNAME\CS101 3. Getting started with Visual C++. 4. Write a program to print

More information

Code No: R Set No. 1

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

More information

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

(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

More information

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

More information

Introduction to C Language (M3-R )

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

More information

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \

1 P a g e A r y a n C o l l e g e \ B S c _ I T \ C \ BSc IT C Programming (2013-2017) Unit I Q1. What do you understand by type conversion? (2013) Q2. Why we need different data types? (2013) Q3 What is the output of the following (2013) main() Printf( %d,

More information

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks Subject Code: CC103-N Subject Title: FUNDAMENTALS OF PROGRAMMING Teaching scheme Total L T P Total Theory Credit Evaluation Scheme Mid Sem Exam CIA Pract. Total Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks

More information

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

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

More information

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2013

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2013 Information Technology, UTU 203 030000 Fundamentals of Programming Problems to be solved in laboratory Note: Journal should contain followings for all problems given below:. Problem Statement 2. Algorithm

More information

Kadi Sarva Vishwavidyalaya, Gandhinagar

Kadi Sarva Vishwavidyalaya, Gandhinagar Kadi Sarva Vishwavidyalaya, Gandhinagar MASTERS OF COMPUTER APPLICATION (MCA) Semester I (First Year) Subject: MCA-101 Programming for Logic Building (LDPL) SUB Teaching scheme Examination scheme Total

More information

Subject: Fundamental of Computer Programming 2068

Subject: Fundamental of Computer Programming 2068 Subject: Fundamental of Computer Programming 2068 1 Write an algorithm and flowchart to determine whether a given integer is odd or even and explain it. Algorithm Step 1: Start Step 2: Read a Step 3: Find

More information

C Programming SYLLABUS COVERAGE SYLLABUS IN DETAILS

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

More information

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

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 :

More information

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

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

More information

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

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

More information

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING COMPUTER PROGRAMMING LABORATORY LAB MANUAL - 15CPL16 SEMESTER-I/II

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING COMPUTER PROGRAMMING LABORATORY LAB MANUAL - 15CPL16 SEMESTER-I/II APPROVED BY AICTE NEW DELHI, AFFILIATED TO VTU BELGAUM DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING COMPUTER PROGRAMMING LABORATORY LAB MANUAL - 15CPL16 SEMESTER-I/II 2016-2017 Prepared by: Reviewed by:

More information

UNIVERSITY OF ENGINEERING & MANAGEMENT, KOLKATA C ASSIGNMENTS

UNIVERSITY OF ENGINEERING & MANAGEMENT, KOLKATA C ASSIGNMENTS UNIVERSITY OF ENGINEERING & MANAGEMENT, KOLKATA C ASSIGNMENTS All programs need to be submitted on 7th Oct 206 by writing in hand written format in A4 sheet. Flowcharts, algorithms, source codes and outputs

More information

M3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

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

More information

Tribhuvan University Institute of Science and Technology 2065

Tribhuvan University Institute of Science and Technology 2065 1CSc.102-2065 2065 Candidates are required to give their answers in their own words as for as practicable. 1. Draw the flow chart for finding largest of three numbers and write an algorithm and explain

More information

CSCI 171 Chapter Outlines

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

More information

Reg. No. : Question Paper Code : 27157

Reg. No. : Question Paper Code : 27157 WK 3 Reg. No. : Question Paper Code : 27157 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2015. Time : Three hours Second Semester Computer Science and Engineering CS 6202 PROGRAMMING AND DATA STRUCTURES

More information

Decision Making -Branching. Class Incharge: S. Sasirekha

Decision Making -Branching. Class Incharge: S. Sasirekha Decision Making -Branching Class Incharge: S. Sasirekha Branching The C language programs presented until now follows a sequential form of execution of statements. Many times it is required to alter the

More information

Syllabus of Diploma Engineering. Computer Engineering. Semester: II. Subject Name: Computer Programming. Subject Code: 09CE1104

Syllabus of Diploma Engineering. Computer Engineering. Semester: II. Subject Name: Computer Programming. Subject Code: 09CE1104 Semester: II Subject Name: Computer Programming Subject Code: 09CE1104 Objective: This Course will help to develop programming skills in the students, using a structured programming language `C'. Students

More information

Euclid s algorithm, 133

Euclid s algorithm, 133 Index A Algorithm computer instructions, 4 data and variables, 5 develop algorithm, 6 American Standard Code for Information Interchange (ASCII) codes, 141 definition, 142 features, 142 Arithmetic expressions

More information

COMPUTER PROGRAMMING LAB

COMPUTER PROGRAMMING LAB COURSE OUTCOMES SEMESTER I Student will be able to: COMPUTER PROGRAMMING LAB 1. Explain basic commands in Linux. 2. Develop programs in C language. 3. Design programs for various problems in C language.

More information

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving) DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW Evaluation Scheme & Syllabus For B.Tech. First Year (Programming for Problem Solving) On Choice Based Credit System (Effective from the Session: 2018-19)

More information

Practice problems Set 2

Practice problems Set 2 Practice problems Set 2 1) Write a program to obtain transpose of a 4 x 4 matrix. The transpose of matrix is obtained by exchanging the elements of each row with the elements of the corresponding column.

More information

MODULE 5: Pointers, Preprocessor Directives and Data Structures

MODULE 5: Pointers, Preprocessor Directives and Data Structures MODULE 5: Pointers, Preprocessor Directives and Data Structures 1. What is pointer? Explain with an example program. Solution: Pointer is a variable which contains the address of another variable. Two

More information

Guide for The C Programming Language Chapter 5

Guide for The C Programming Language Chapter 5 1. Differentiate between primitive data type and non-primitive data type. Primitive data types are the basic data types. These data types are used to represent single values. For example: Character, Integer,

More information

Q1. Multiple Choice Questions

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

More information

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

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

More information

Arrays, Pointers and Memory Management

Arrays, Pointers and Memory Management Arrays, Pointers and Memory Management EECS 2031 Summer 2014 Przemyslaw Pawluk May 20, 2014 Answer to the question from last week strct->field Returns the value of field in the structure pointed to by

More information

Course Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3

Course Title: C Programming Full Marks: Course no: CSC110 Pass Marks: Nature of course: Theory + Lab Credit hours: 3 Detailed Syllabus : Course Title: C Programming Full Marks: 60+20+20 Course no: CSC110 Pass Marks: 24+8+8 Nature of course: Theory + Lab Credit hours: 3 Course Description: This course covers the concepts

More information

E.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu.

E.G.S. PILLAY ENGINEERING COLLEGE (An Autonomous Institution, Affiliated to Anna University, Chennai) Nagore Post, Nagapattinam , Tamilnadu. 7CA00 PROBLEM SOLVING AND PROGRAMMING Academic Year : 08-09 Programme : P.G-MCA Question Bank Year / Semester : I/I Course Coordinator: A.HEMA Course Objectives. To understand the various problem solving

More information

COP 3223 Introduction to Programming with C - Study Union - Fall 2017

COP 3223 Introduction to Programming with C - Study Union - Fall 2017 COP 3223 Introduction to Programming with C - Study Union - Fall 2017 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................

More information

(Following Paper ID and Roll No. to be filled by the student in the Answer Book)

(Following Paper ID and Roll No. to be filled by the student in the Answer Book) F:/Academic/27 Refer/WI/ACAD/10 SHRI RAMSWAROOP MEMORIAL COLLEGE OF ENGG. & MANAGEMENT PAPER ID: 1602 (Following Paper ID and Roll No. to be filled by the student in the Answer Book) Roll No. B.Tech. SEM

More information

SAURASHTRA UNIVERSITY

SAURASHTRA UNIVERSITY SAURASHTRA UNIVERSITY RAJKOT INDIA Accredited Grade A by NAAC (CGPA 3.05) CURRICULAM FOR B.Sc. (Computer Science) Bachelor of Science (Computer Science) (Semester - 1 Semester - 2) Effective From June

More information

Unit IV & V Previous Papers 1 mark Answers

Unit IV & V Previous Papers 1 mark Answers 1 What is pointer to structure? Pointer to structure: Unit IV & V Previous Papers 1 mark Answers The beginning address of a structure can be accessed through the use of the address (&) operator If a variable

More information

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

Long Questions. 7. How does union help in storing the values? How it differs from structure? Long Questions April/May - 2010 Marks 1. Explain arithmetic operators and their precedence in C. 2. Explain the term structured programming with help of example 3. Write a program to read 10 numbers and

More information

C & Data Structures syllabus

C & Data Structures syllabus syllabus Overview: C language which is considered the mother of all languages, is and will be the most sought after programming language for any beginner to jump start his career in software development.

More information

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE CLASS XI

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE CLASS XI KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE 2015-2016 CLASS XI Month Portion to be covered Th Prac July 2015 Computer Fundamentals 25 8 Classification of computers:

More information

Arrays and Pointers (part 1)

Arrays and Pointers (part 1) Arrays and Pointers (part 1) CSE 2031 Fall 2012 Arrays Grouping of data of the same type. Loops commonly used for manipulation. Programmers set array sizes explicitly. Arrays: Example Syntax type name[size];

More information

#3. (Recursion) Write a recursive function to compute f(x) = f(x - 1) + f(x - 2) with f(0) = 0 and f(1) = 1.

#3. (Recursion) Write a recursive function to compute f(x) = f(x - 1) + f(x - 2) with f(0) = 0 and f(1) = 1. EGN 3210 Sample Test 2 Dr. Fernando Gonzalez NAME S.S.# #1. (Functions) Write a function that receives 3 integers, and returns the value of the largest one through the function name. #2. (Functions) What

More information

PESIT Bangalore South Campus Hosur road, 1km before ElectronicCity, Bengaluru -100 Department of Basic Science and Humanities

PESIT Bangalore South Campus Hosur road, 1km before ElectronicCity, Bengaluru -100 Department of Basic Science and Humanities INTERNAL ASSESSMENT TEST-3 Date : 12-05-2016 Marks: 40 Subject & Code : Programming in C and data structures (15PCD23) Sec : F,G,H,I,J,K Name of faculty :Dr J Surya Prasad/Mr.Sreenath M V/Ms.Monika/ Time

More information

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

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language 1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

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

More information

'C' Programming Language

'C' Programming Language F.Y. Diploma : Sem. II [DE/EJ/ET/EN/EX] 'C' Programming Language Time: 3 Hrs.] Prelim Question Paper Solution [Marks : 70 Q.1 Attempt any FIVE of the following : [10] Q.1(a) Define pointer. Write syntax

More information

Gujarat University M. Sc. Computer Science [S. F.] Semester-1 Syllabus Gujarat Arts & Science College, Ahmedabad.

Gujarat University M. Sc. Computer Science [S. F.] Semester-1 Syllabus Gujarat Arts & Science College, Ahmedabad. B. Sc. Computer Science SEM-II EFFECTIVE FROM ACADEMIC YEAR - 2016-2017 CODE Titles Th. Pr. COM-103 ProgramminginC (Theory) 4 COM-104 ProgramminginC(Practical) 4 Teaching Scheme Unit Computer Theory COM

More information

Dynamic memory allocation

Dynamic memory allocation Dynamic memory allocation outline Memory allocation functions Array allocation Matrix allocation Examples Memory allocation functions (#include ) malloc() Allocates a specified number of bytes

More information

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

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

More information

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

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

More information

ESC101N: Fundamentals of Computing End-sem st semester

ESC101N: Fundamentals of Computing End-sem st semester ESC101N: Fundamentals of Computing End-sem 2010-11 1st semester Instructor: Arnab Bhattacharya 8:00-11:00am, 15th November, 2010 Instructions 1. Please write your name, roll number and section below. 2.

More information

Midterm Examination # 2 Wednesday, March 19, Duration of examination: 75 minutes STUDENT NAME: STUDENT ID NUMBER:

Midterm Examination # 2 Wednesday, March 19, Duration of examination: 75 minutes STUDENT NAME: STUDENT ID NUMBER: Page 1 of 7 School of Computer Science 60-141-01 Introduction to Algorithms and Programming Winter 2014 Midterm Examination # 2 Wednesday, March 19, 2014 ANSWERS Duration of examination: 75 minutes STUDENT

More information

3/22/2016. Pointer Basics. What is a pointer? C Language III. CMSC 313 Sections 01, 02. pointer = memory address + type

3/22/2016. Pointer Basics. What is a pointer? C Language III. CMSC 313 Sections 01, 02. pointer = memory address + type Pointer Basics What is a pointer? pointer = memory address + type C Language III CMSC 313 Sections 01, 02 A pointer can contain the memory address of any variable type A primitive (int, char, float) An

More information

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

Assignment: 1. (Unit-1 Flowchart and Algorithm) Assignment: 1 (Unit-1 Flowchart and Algorithm) 1. Explain: Flowchart with its symbols. 2. Explain: Types of flowchart with example. 3. Explain: Algorithm with example. 4. Draw a flowchart to find the area

More information

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

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

More information

IV Unit Second Part STRUCTURES

IV Unit Second Part STRUCTURES STRUCTURES IV Unit Second Part Structure is a very useful derived data type supported in c that allows grouping one or more variables of different data types with a single name. The general syntax of structure

More information

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

More information

10/20/2015. Midterm Topic Review. Pointer Basics. C Language III. CMSC 313 Sections 01, 02. Adapted from Richard Chang, CMSC 313 Spring 2013

10/20/2015. Midterm Topic Review. Pointer Basics. C Language III. CMSC 313 Sections 01, 02. Adapted from Richard Chang, CMSC 313 Spring 2013 Midterm Topic Review Pointer Basics C Language III CMSC 313 Sections 01, 02 1 What is a pointer? Why Pointers? Pointer Caution pointer = memory address + type A pointer can contain the memory address of

More information

Pointers (part 1) What are pointers? EECS We have seen pointers before. scanf( %f, &inches );! 25 September 2017

Pointers (part 1) What are pointers? EECS We have seen pointers before. scanf( %f, &inches );! 25 September 2017 Pointers (part 1) EECS 2031 25 September 2017 1 What are pointers? We have seen pointers before. scanf( %f, &inches );! 2 1 Example char c; c = getchar(); printf( %c, c); char c; char *p; c = getchar();

More information

Procedural programming with C

Procedural programming with C Procedural programming with C Dr. C. Constantinides Department of Computer Science and Software Engineering Concordia University Montreal, Canada August 11, 2016 1 / 77 Functions Similarly to its mathematical

More information

Arrays and Pointers (part 1)

Arrays and Pointers (part 1) Arrays and Pointers (part 1) CSE 2031 Fall 2010 17 October 2010 1 Arrays Grouping of data of the same type. Loops commonly used for manipulation. Programmers set array sizes explicitly. 2 1 Arrays: Example

More information

Kurt Schmidt. October 30, 2018

Kurt Schmidt. October 30, 2018 to Structs Dept. of Computer Science, Drexel University October 30, 2018 Array Objectives to Structs Intended audience: Student who has working knowledge of Python To gain some experience with a statically-typed

More information

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

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 Name :. Roll No. :..... Invigilator s Signature :.. 2011 INTRODUCTION TO PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give

More information

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

The Hyderabad Public School, Begumpet, Hyderabad, A.P 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)

More information

211: Computer Architecture Summer 2016

211: Computer Architecture Summer 2016 211: Computer Architecture Summer 2016 Liu Liu Topic: C Programming Data Representation I/O: - (example) cprintf.c Memory: - memory address - stack / heap / constant space - basic data layout Pointer:

More information

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

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

More information

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

More information

Note: unless otherwise stated, the questions are with reference to the C Programming Language. You may use extra sheets if need be.

Note: unless otherwise stated, the questions are with reference to the C Programming Language. You may use extra sheets if need be. CS 156 : COMPUTER SYSTEM CONCEPTS TEST 1 (C PROGRAMMING PART) FEBRUARY 6, 2001 Student s Name: MAXIMUM MARK: 100 Time allowed: 45 minutes Note: unless otherwise stated, the questions are with reference

More information

Unit 7. Functions. Need of User Defined Functions

Unit 7. Functions. Need of User Defined Functions Unit 7 Functions Functions are the building blocks where every program activity occurs. They are self contained program segments that carry out some specific, well defined task. Every C program must have

More information

Lectures 5-6: Introduction to C

Lectures 5-6: Introduction to C Lectures 5-6: Introduction to C Motivation: C is both a high and a low-level language Very useful for systems programming Faster than Java This intro assumes knowledge of Java Focus is on differences Most

More information

Class 9 Saturday, Feb 14

Class 9 Saturday, Feb 14 Jahangirabad Institute of technology Er.Amit Kr Pathak Computer System & Programming in C, NCS-201 Semester II, 2016(Odd Sem.) MASTER SCHEDULE [U-1] week 1 Class 1 Monday, Feb 1 Introduction to digital

More information

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

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

More information

C Programming Review CSC 4320/6320

C Programming Review CSC 4320/6320 C Programming Review CSC 4320/6320 Overview Introduction C program Structure Keywords & C Types Input & Output Arrays Functions Pointers Structures LinkedList Dynamic Memory Allocation Macro Compile &

More information

PESIT-BSC Department of Science & Humanities

PESIT-BSC Department of Science & Humanities LESSON PLAN 15PCD13/23 PROGRAMMING IN C AND DATA Course objectives: STRUCTURES The objective of this course is to make students to learn basic principles of Problem solving, implementing through C programming

More information

A. Year / Module Semester Subject Topic 2016 / V 2 PCD Pointers, Preprocessors, DS

A. Year / Module Semester Subject Topic 2016 / V 2 PCD Pointers, Preprocessors, DS Syllabus: Pointers and Preprocessors: Pointers and address, pointers and functions (call by reference) arguments, pointers and arrays, address arithmetic, character pointer and functions, pointers to pointer,initialization

More information

Functions. Arash Rafiey. September 26, 2017

Functions. Arash Rafiey. September 26, 2017 September 26, 2017 are the basic building blocks of a C program. are the basic building blocks of a C program. A function can be defined as a set of instructions to perform a specific task. are the basic

More information

Software Development & Education Center C Programming

Software Development & Education Center C Programming Software Development & Education Center C Programming Detailed Curriculum History of C Features of C Requirement from C development Turbo C 3 Turbo C 45 Borland C++ 502 Rules for C Programming Writing

More information

Loops / Repetition Statements

Loops / Repetition Statements Loops / Repetition Statements Repetition statements allow us to execute a statement multiple times Often they are referred to as loops C has three kinds of repetition statements: the while loop the for

More information

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI 2017-2018 Worksheet No. 1 Topic : Getting Started With C++ 1. Write a program to generate the following output: Year Profit% 2011 18 2012 27 2013 32

More information

COP 3223 Introduction to Programming with C - Study Union - Spring 2018

COP 3223 Introduction to Programming with C - Study Union - Spring 2018 COP 3223 Introduction to Programming with C - Study Union - Spring 2018 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 13, SPRING 2013

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 13, SPRING 2013 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 13, SPRING 2013 TOPICS TODAY Reminder: MIDTERM EXAM on THURSDAY Pointer Basics Pointers & Arrays Pointers & Strings Pointers & Structs

More information

Linked List. April 2, 2007 Programming and Data Structure 1

Linked List. April 2, 2007 Programming and Data Structure 1 Linked List April 2, 2007 Programming and Data Structure 1 Introduction head A linked list is a data structure which can change during execution. Successive elements are connected by pointers. Last element

More information

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++ No. of Printed Pages : 3 I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination 05723. June, 2015 BCS-031 : PROGRAMMING IN C ++ Time : 3 hours Maximum Marks : 100 (Weightage 75%)

More information

Sample Copy. Not For Distribution.

Sample Copy. Not For Distribution. Computer System and Programming in C i Publishing-in-support-of, EDUCREATION PUBLISHING RZ 94, Sector - 6, Dwarka, New Delhi - 110075 Shubham Vihar, Mangla, Bilaspur, Chhattisgarh - 495001 Website: www.educreation.in

More information

MODULE V: POINTERS & PREPROCESSORS

MODULE V: POINTERS & PREPROCESSORS MODULE V: POINTERS & PREPROCESSORS INTRODUCTION As you know, every variable is a memory-location and every memory-location has its address defined which can be accessed using ampersand(&) operator, which

More information

17CS33:Data Structures Using C QUESTION BANK

17CS33:Data Structures Using C QUESTION BANK 17CS33:Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C Learn : Usage of structures, unions - a conventional tool for handling a group of logically

More information

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

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

More information

C PROGRAMMING LAB MANUAL

C PROGRAMMING LAB MANUAL C PROGRAMMING LAB MANUAL For BEX/BCT/B.Sc.CSIT/BIM/BCA BY BABU RAM DAWADI RAM DATTA BHATTA 448/ From the Book: Capsules of C Programming Appendix - B C PROGRAMMING LAB SHEETS Dear Students, Welcome to

More information

Lab 3. Pointers Programming Lab (Using C) XU Silei

Lab 3. Pointers Programming Lab (Using C) XU Silei Lab 3. Pointers Programming Lab (Using C) XU Silei slxu@cse.cuhk.edu.hk Outline What is Pointer Memory Address & Pointers How to use Pointers Pointers Assignments Call-by-Value & Call-by-Address Functions

More information

Loops / Repetition Statements

Loops / Repetition Statements Loops / Repetition Statements Repetition statements allow us to execute a statement multiple times Often they are referred to as loops C has three kinds of repetition statements: the while loop the for

More information

Madhya Pradesh Bhoj (Open) University, Bhopal

Madhya Pradesh Bhoj (Open) University, Bhopal Subject- Computer Organisation & System Software Maximum Marks: 20 Q.1 What is Number System? Explain Its Types? Q.2 What is Program Interrupt? Explain it. Q.3 Explain the Floating Point Representation?

More information

IMPORTANT QUESTIONS IN C FOR THE INTERVIEW

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.

More information