×
Expect problems and eat them for breakfast.
--Your friends at LectureNotes
Close

Programming in C

by Debabrata DansanaDebabrata Dansana
Type: NoteInstitute: Biju Patnaik University of Technology BPUT Specialization: Computer Science EngineeringOffline Downloads: 1470Views: 39881Uploaded: 11 months ago

Touch here to read
Page-1

Programming in C by Debabrata Dansana

Topic:
Debabrata Dansana
Debabrata Dansana

/ 170

Share it with your friends

Suggested Materials

References

Programming with ANSI C With V-Labs

Leave your Comments

Contributors

Debabrata Dansana
Debabrata Dansana
C PROGRAMMING Digital Notes By :- DEBABRATA DANSANA Asst.professor Dept. of Computer Science Engineering KIST. Bhubaneswar Ph.D Utkal University(Continuing…….) Contact No :-9776456781 Email id :- devs.kist@gmail.com Supported By :- Pratiksha Maity Avijit Kumar Ujjwal Sharma
First Semester B.Tech Syllabus for Admission Batch 2016-17 Module – I C program - header files, C pre-processor, standard library functions, etc., identifiers, basic data types and sizes, constants, variables, arithmetic, relational and logical operators, increment and decrement operators, conditional operator, bit-wise operators, assignment operators, expressions, type conversions, conditional expressions, Input-output statements, if and switch statements ,loops:-while, do-while and for statements, break, continue, etc. a) Write a C program to find the sum of individual digits of a positive integer. b) Write a C program to find Fibonacci sequence. c) Write a C program to generate all the prime numbers between 1 and n. d) Write a C program to find the roots of a quadratic equation. e) Write a C program to find both the largest and smallest number in a list of integers. Module – II Designing structured programs: - Functions, parameter passing, storage classesextern, auto, register, static, scope rules, user defined functions, recursive functions. Arrays - concepts, declaration, definition, accessing elements, and functions, Pointersconcepts, initialization of pointer variables, pointers and function arguments, address arithmetic, Character pointers and functions, pointers to pointers, Dynamic memory management. a) Write C programs that use both recursive and non-recursive functions i) To find the factorial of a given integer. ii) To find the GCD (Greatest Common Divisor) of two given integers. iii) To solve Towers of Hanoi problem. b) Write a C program that uses functions to perform the following: i) Addition of Two Matrices ii) Multiplication of Two Matrices c) Write a C program that uses functions to perform the following operations: i) To insert a sub-string in to given main string from a given position. ii) To delete n Characters from a given position in a given string. d) Write a C program to determine if the given string is a palindrome or not e) Write a C program to construct a pyramid of numbers. Module – III Derived types- structures- declaration, definition and initialization of structures, accessing structures, nested structures, arrays of structures, structures and functions, pointers to structures, union. a) Write a program to display Name, Roll Number, Marks of different subjects etc. of n number of students. b) Write a C program to count the lines, words and characters in a given text. c) Write a C program that uses structure to perform the following operations: i) Reading a complex number ii) Writing a complex number iii) Addition of two complex numbers iv) Multiplication of two complex numbers (Note: represent complex number using a structure.)
Module – I C program - header files, C pre-processor, standard library functions, etc., identifiers, basic data types and sizes, constants, variables, arithmetic, relational and logical operators, increment and decrement operators, conditional operator, bit-wise operators, assignment operators, expressions, type conversions, conditional expressions, Input-output statements, if and switch statements ,loops:-while, do-while and for statements, break, continue, etc. a) Write a C program to find the sum of individual digits of a positive integer. b) Write a C program to find Fibonacci sequence. c) Write a C program to generate all the prime numbers between 1 and n. d) Write a C program to find the roots of a quadratic equation. e) Write a C program to find both the largest and smallest number in a list of integers.
C Programming C programming is a popular computer programming language which is widely used for system and application software. Despite being fairly old programming language, C programming is widely used because of its efficiency and control. This tutorial is intended for beginners who does not have any prior knowledge or have very little knowledge of computer programming. All basic features of C programming language are included in detail with explanation and output to give you solid platform to understand C programming. C Programming Keywords and Identifiers Character set Character set are the set of alphabets, letters and some special characters that are valid in C language. Alphabets: Uppercase: A B C .................................... X Y Z Lowercase: a b c ...................................... x y z Digits: 0123456 89 Special Characters: , ' < & > { . } Special Characters in C language _ ( ) ; $ : % " ^ ! * / | - [ \ ] ~ # + White space Characters: blank space, new line, horizontal tab, carriage return and form feed Keywords: Keywords are the reserved words used in programming. Each keywords has fixed meaning and that cannot be changed by user. For example: int money; Here, int is a keyword that indicates, 'money' is of type integer. ?

Lecture Notes