Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Programming with C for students, Summaries of C programming

It shows that which are the topics you would have to study in C language

Typology: Summaries

2018/2019

Uploaded on 05/27/2019

mersal-manoj
mersal-manoj 🇮🇳

2 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Directorate Of Technical Education Karnataka State CS&E 15CS31T
Government of Karnataka
Department of Technical Education
Bengaluru
Course Title:
Programming with C
Scheme (L:T:P) : 4:0:0 Total Contact Hours: 52 Course Code:
15CS31T
Type of Course: Lectures, Self
Study & Student Activity Credit :04 Core/ Elective:
Core
CIE- 25 Marks SEE- 100 Marks
Prerequisites
Knowledge of basic mathematics and IT skills..
Course Objectives
Understand the syntax of data types, analyze various formatting styles for input/output and
appreciate the use of arrays, strings and functions to write C programs.
Course Outcome
On successful completion of the course, the students will be able to attain below Course
Outcome (CO):
Course outcome CL Linked PO Teaching
Hours
CO1
Illustrate syntax rules for numerical constants and
variables, data types, arithmetic operators and
expressions and Articulate them with different
types of input/output formats using simple
problems.
R,
U1,2,3,4,8,9,10
10
CO2 Discuss different branching and looping statements
and experiment using simple programs.
U,
A1,2,3,4,8,9,10 14
CO3 Discuss different types of functions and write
simple programs.
U,
A1,2,3,4,8,9,10
06
CO4 Explain different types of arrays and write simple
programs.
U,
A1,2,3,4,8,9,10 08
CO5 Describe preprocessor and Discuss different types
of string functions.
U,
A1,2,3,4,8,9,10
06
CO6 Describe and differentiate between structure and
unions to write simple programs.
U,
A1,2,3,4,8,9,10 08
Total sessions 52
Legends: R = Remember U= Understand; A= Apply and above levels (Bloom’s revised
taxonomy)
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Programming with C for students and more Summaries C programming in PDF only on Docsity!

1

Government of Karnataka Department of Technical Education Bengaluru

Course Title: Programming with C

Scheme (L:T:P) : 4:0:0 Total Contact Hours: 52 Course Code: 15CS31T Type of Course: Lectures, Self Study & Student Activity Credit : Core/ Elective: Core CIE- 25 Marks SEE- 100 Marks

Prerequisites

Knowledge of basic mathematics and IT skills..

Course Objectives

Understand the syntax of data types, analyze various formatting styles for input/output and appreciate the use of arrays, strings and functions to write C programs.

Course Outcome

On successful completion of the course, the students will be able to attain below Course Outcome (CO):

Course outcome CL Linked PO Teaching Hours

CO

Illustrate syntax rules for numerical constants and variables, data types, arithmetic operators and expressions and Articulate them with different types of input/output formats using simple problems.

R,

U

CO2 (^) Discuss different branching and looping statements and experiment using simple programs.

U,

A

CO3 (^) Discuss different types of functions and write simple programs.

U,

A 1,2,3,4,8,9,

CO4 (^) Explain different types of arrays and write simple programs.

U,

A

CO5 (^) Describe preprocessor and Discuss different types of string functions.

U,

A 1,2,3,4,8,9,

CO6 (^) Describe and differentiate between structure and unions to write simple programs.

U,

A

Total sessions 52

Legends: R = Remember U= Understand; A= Apply and above levels (Bloom’s revised taxonomy)

2

Course-PO Attainment Matrix

Course Programme Outcomes 1 2 3 4 5 6 7 8 9 10 Programming with C 3 3 3 3 - - - 3 3 3 Level 3- Highly Addressed, Level 2-Moderately Addressed, Level 1-Low Addressed. Method is to relate the level of PO with the number of hours devoted to the COs which address the given PO. If >40% of classroom sessions addressing a particular PO, it is considered that PO is addressed at Level 3 If 25 to 40% of classroom sessions addressing a particular PO, it is considered that PO is addressed at Level 2 If 5 to 25% of classroom sessions addressing a particular PO, it is considered that PO is addressed at Level 1 If < 5% of classroom sessions addressing a particular PO, it is considered that PO is considered not-addressed.

Course Content and Blue Print of Marks for SEE

Unit No Unit Name

Hour Questions to be set for SEE

Marks Weightage

Marks Weightage (%) R U A A I Introduction to 'C' Language

II Decision making- Branching and Looping

III Functions 06 - 10 10 20 11.

IV Arrays (^) 08 - 07 15 22 15.

V Strings & Pre-processor 06 - 06 10 16 11.

VI Structures & Unions 08 - 12 10 22 15.

Total 52 5 62 78 145 100

UNIT I: Introduction to 'C' Language 10 Hrs

Character set, Variables and Identifiers, Built-in Data Types, Variable Definition, Declaration, C Key Words-Rules & Guidelines for Naming Variables. Arithmetic operators and Expressions, Constants and Literals, Precedence and Order of Evaluation. Simple assignment statement, Basic input/output statement, Simple 'C' programs. Algorithms – Definition and Characteristics. Simple algorithms. Flow chart – Type of flow chart. Simple flow charts

UNIT II: Decision making- Branching and Looping 14 Hrs

Conditions, Relational Operators, Logical Operator. if statement, if-else statement, nested if-

else, if-else ladder, Switch, Break, Continue, Goto and Labels. Looping statements – while, do-while, for and nested for loop.

4

Note: the following activities or similar activities for assessing CIE (IA) for 5 marks (Any one) Student activity like mini-project, surveys, quizzes, etc. should be done in group of 3- students.

  1. Each group should do any one of the following type activity or any other similar activity related to the course and before conduction, get it approved from concerned course coordinator and programme coordinator. 2. Each group should conduct different activity and no repeating should occur

1 Explore and analyze topics to improve the level of creativity and analytical skill by taking Quiz tests / assignments. Documents have to be maintained as a record. 2 Create a power point presentation on the topic relevant to course or advanced topic as an extension to the course to improve the communication skills. Documents have to be maintained as a record 3 Visit different sites relevant to topics. Listen to the lectures and submit a handwritten report

Course Delivery

The course will be delivered through lectures and Power point presentations/ Video

Course Assessment and Evaluation Scheme

Method What To who m

When/Where (Frequency in the course)

Max Marks

Evidence collected

Course outcomes

Direct Assessment

CIE IA

Students

Three IA tests (Average of three tests will be computed)

20 Blue books 1 to 6

Student activities 05 Report 1 to 6 Total (^25)

SEE End Exam

End of the course

Answer scripts at BTE 1 to 6

Indirect Assessment

Student Feedback on course

Students

Middle of the course Feedback forms

Delivery of course End of Course Survey

End of the course

Questionnaires

1 to 6 Effectiveness of Delivery of instructions & Assessment Methods Note: I.A. test shall be conducted for 20 marks. Average marks of three tests shall be rounded off

to the next higher digit.

5

Questions for CIE and SEE will be designed to evaluate the various educational components (Bloom’s taxonomy) such as: Sl. No Bloom’s Category % 1 Remembrance 10 2 Understanding 45 3 Application 45

Note to IA verifier : The following documents to be verified by CIE verifier at the end of semester

  1. Blue books (20 marks)
  2. Student suggested activities report for 5 marks
  3. Student feedback on course regarding Effectiveness of Delivery of instructions & Assessment Methods.

FORMAT OF I A TEST QUESTION PAPER (CIE)

Test/Date and Time Semester/year Course/Course Code Max Marks

Ex: I test/6 th^ weak of sem 10-11 Am

I/II SEM

20 Year: Name of Course coordinator : Units:__ CO’s:____

Question no Question^ MARKS^ CL^ CO^ PO 1 2 3 4 Note: Internal Choice may be given in each CO at the same cognitive level (CL).

MODEL QUESTION PAPER (CIE)

Test/Date and Time Semester/year Course/Course Code Max Marks

Ex: I test/6 th^ weak of sem 10-11 AM

III SEM Programming with C 20 Year: 2015-16 Course code:15CS31T Name of Course coordinator : Units:1,2 Co: 1, Note: Answer all questions Questio n no

Question CL

C

O

PO

1 What is variable? Write the rules and guidelines for naming variable? (5) OR Evaluate the expression (a + b) * (c + d) + e – f/g*h + 3.25, where a=5, b=3, c=-2, d=7, e=1, f=6, g=8, h=

R 1 1,

7

MODEL QUESTION PAPER Code: 15CS31T Diploma in Computer science & Enginnering III- Semester Course Title: Programming with C

Time: 3 Hours Max Marks : 100

PART-A Answer any SIX questions. Each carries 5 marks. 5X6=30 Marks

1) What is a variable? Write the rules and guidelines for naming variable?

2) Explain scanf() statement with an example

3) Compare while and do....while statement.

4) Explain Relational and Logical operators

5) Write a short note on C library functions

6) What are the advantages of functions?

7) List string handling functions.

8) Define a structure. Give general syntax of a structure. Explain with an example.

9) Compare array versus structures.

PART-B

Answer any SEVEN full questions each carries 10 marks. 10X7=70 Marks

  1. Explain the data types of C language
  2. Write a C program to swap the values of two variables without using third variable
  3. Explain the switch statement with syntax with an example.
  4. Write a program to find the sum of n natural numbers.
  5. Explain If......else statements with an example.
  6. Explain the following:

i. Passing argument to a function ii. Returning value from a function

  1. a) List the advantages and disadvantages of an array. b) What is an array? How are arrays declared and initialized?
  2. Write a program to find the transpose of a matrix.
  3. Explain the following function with an example:

8

i. getchar() ii. strrev() iii. strcmp() iv. strcat() v. strcpy()

  1. Write a program to create structure with an employee details & display the same.

MODEL QUESTION BANK

Diploma in Computer Science & Engineering III Semester Course Title: Programming with C

CO Question CL Marks

I

What is a token? Give example for each type of token. R

What is a constant? Explain different types of C constants. (^) R What is variable? Write the rules and guidelines for naming variable? R Define the term Identifier. Give an example. (^) R List the basic data types with byte specification U List the hierarchy (precedence ) rules of arithmetic operators. U Evaluate the expression 2 + 1 * 3 - 4 % 3 * 1 + 16 / 2 % 5 and smilar type expressions to be solved having arithmetic, relational and logical operators also

U

List the important features of C language. (^) U Give a general form of ternary operator, Explain with an example. (^) A Explain simple assignments in C. Give an example. U List input and output functions (^) U Explain printf() statement with an example. A Explain scanf() statement with an example. A Define algorithm? Explain its characteristics (^) U Define flow chart? List the symbols used in flow-chart U Write a algorithm and C program to find the sum and average of three numbers

A

With general syntax explain formatted input-output statements. Give example for each.

U

Define the following with an example: i. Increment Operator. ii. Decrement Operator

U

  1. Explain the basic data types of C language. U Define the following with an example: i. C Keyword. ii. Variable. iii. Constants. iv. Format Specifier v. Arithmetic Expression.

U

Define the following terms. Give one example each. i. Constant. ii. Keyword. iii. Relational Expression. iv. Assignment statement.

U

10

Write a program to generate Fibonacci series. A Write a program to find the sum of n natural numbers. A Write a program to find the reverse of a given numbers. (^) A Write a program to count even and odd from n natural numbers. A

III

Define function. List different types of functions. U

What are the advantages of functions? (^) U List the difference between actual parameters and formal Parameters. U Explain scope and lifetime of a variable in a function. U What do you mean by user defined function? Explain. (^) U Write a short note on C library functions. U Write a user defined function great() that computes greatest of two numbers and return the largest number to function main().

A

Write the block structure of a function. (^) U Define the following

  1. Formal parameter
  2. Actual parameter
  3. Return type
  4. Function call

U

What is a function prototype give an example. U Write a program to find the factorial of a given number using function. A

Write a program to find the GCD of a given number using function. A Explain Call by Value with an example. (^) U Explain the following with a example: i. Passing argument to a function ii. Returning value from a function

A

IV

What is an array? Explain how to declare and initialize a single dimension array?

U

With an example, explain declaration & initialization of two dimensional array.

U

Compare one dimensional array with two dimensional array. U Explain multidimensional array with an example. (^) A Write an algorithm to search a given key in the array of elements. A Discuss one dimensional array with example. U Explain different operations on arrays. (^) U Write a program in C to store 25 elements (integers) in two-dimensional array called "temp" in 5-rows and 5-columns. The program should also display these numbers in a matrix format.

A

Write a program to transpose the given matrix. A List the advantages and disadvantages of an array. U Write a C program to find the sum of principle diagonal elements of a matrix.

A

Write a program to search an element in an array. (^) A Write a program to find the sum and number of positive numbers and negative numbers in an array

A

Write a program to sort 'N' elements of an array using simple sort. A Define the following: a. Array b. Searching c. Sorting

U

11

Write a program to find the sum of two matrices. A 10 Write a C function to compute trace and norm of a matrix. A Write C function to compute largest of N numbers. (^) A

V

Define string. How to Declare & Initialize string variables with an example.

U

Write a program to concatenate two strings using in-built string function.

A

Explain how to read the string from the terminal and write a string to the terminal with an example.

U

Explain with an example the Null-terminated strings as "Array of Characters".

U

Write a C program to check whether the given string is a palindrome or not.

A

List string handling functions. (^) U Write a program to compare any two strings using string functions (^) A List the advantages of preprocessor directives. A

Explain briefly how to use #define directive. (^) A Write a short note on File inclusion. U Explain with Example the #include preprocessor directive. A How do you define symbolic constants? Illustrate with an example (^) A Explain the following function with an example: i. getchar() ii. strrev() iii. strcmp() iv. strcat() v. strcpy()

U 10

Define a macro. Explain macro substitution with an example. (^) U

Define string. Give an example. Explain the various string handling functions with an example.

U

Write a C program to verify that the given string is palindrome or not using iterative method.

A

Write a program to find the area of a circle using macros. A Write a note on the following: a. Pre-processor directive b. Macro substitution

U

VI

Define a structure. Explain with an example, the general syntax of a structure.

U 5

What are structure variables? Explain how to declare and initialize a structure variable.

U

Define a union. Explain with an example, the general syntax of a union. U List the difference between Union and Structure. U Compare Arrays versus Structures. (^) U

Define array of structure. Give an example. U Explain array variable as a structure member with an example. U Explain array of structure with an example. (^) U 10 Explain the need of structure within a structure (nested structure) with an example

U