Sunday, November 29, 2020

CMS-A-CC-1-2-P: Programming with C Core Course-2: Practical: 02 Credits: 40 hours

 1. WAP to print the sum and product of digits of an integer.

2.WAP to reverse a number.

3. WAP to compute the sum of the first n terms of the following series,

S=1+1/2+1/3+1/4+……

4. WAP to compute the sum of the first n terms of the following series, S =1-2+3-

4+5…………….

5. Write a function that checks whether a given string is Palindrome or not. Use this function

to find whether the string entered by user is Palindrome or not.

6.Write a function to find whether a given no. is prime or not. Use the same to generate the

prime numbers less than 100.

7. WAP to compute the factors of a given number.

8. Write a macro that swaps two numbers. WAP to use it.

9.WAP to print a triangle of stars as follows (take number of lines from user):

                *

              ***

           *****

        *******

     *********

10. 10.WAP to perform following actions on an array entered by the user :

i) Print the even-valued elements

ii) Print the odd-valued elements

iii) Calculate and print the sum and average of the elements of array

iv) Print the maximum and minimum element of array

v) Remove the duplicates from the array

vi) Print the array in reverse order

The program should present a menu to the user and ask for one of the options. The menu

should also include options to re-enter array and to quit the program.

11. WAP that prints a table indicating the number of occurrences of each alphabet in the text

entered as command line arguments.

12. Write a program that swaps two numbers using pointers.

13. Write a program in which a function is passed address of two variables and then alter its

contents.

14. Write a program which takes the radius of a circle as input from the user, passes it to

another function that computes the area and the circumference of the circle and displays

the value of area and circumference from the main() function.

15. Write a program to find sum of n elements entered by the user. To write this program,

allocate memory dynamically using malloc() / calloc() functions or new operator.

16. Write a menu driven program to perform following operations on strings:

a) Show address of each character in string

b) Concatenate two strings without using strcat function.

c) Concatenate two strings using strcat function.

d) Compare two strings

e) Calculate length of the string (use pointers)

f) Convert all lowercase characters to uppercase

g) Convert all uppercase characters to lowercase

h) Calculate number of vowels

i) Reverse the string

17. Given two ordered arrays of integers, write a program to merge the two-arrays to get an

ordered array.

18. WAP to display Fibonacci series (i) using recursion, (ii) using iteration.

19. WAP to calculate Factorial of a number (i) using recursion, (ii) using iteration.

20. WAP to calculate GCD of two numbers (i) with recursion (ii) without recursion.

21. Write a menu-driven program to perform following Matrix operations (2-D array

implementation): a) Sum b) Difference c) Product d) Transpose

22. Copy the contents of one text file to another file, after removing all whitespaces.

23. Write a function that reverses the elements of an array in place. The function must accept

only one pointer value and return void.

24. Write a program that will read 10 integers from user and store them in an array.

Implement array using pointers. The program will print the array elements in ascending

and descending order.

25. Add two distances in meter kilometer system using structure.

26. Add two complex numbers using structures.

27. Calculate the difference between two time periods using structures.

These are only examples; more can be included related to the theory.

Use open source C compiler.

CMS-A-CC-1-2-TH: Programming Fundamentals using C Core Course-2: Theory: 04 Credits: 60 hours

 Introduction:

History, Basic Structure, Algorithms, Structured programming constructs.


C Programming elements:

Character sets, Keywords, Constants, Variables, Data Types, Operators-

Arithmetic, Relational, Logical and Assignment; Increment and Decrement

and Conditional, Operator Precedence and Associations; Expressions, type

casting. Comments, Functions, Storage Classes, Bit manipulation, Input and

output.


C Preprocessor:

File inclusion, Macro substitution.


Statements:

Assignment, Control statements- if, if else, switch, break, continue, goto,

Loops-while, do while, for.


Functions:

Argument passing, return statement, return values and their types, recursion


Arrays:

String handling with arrays, String handling functions.


Pointers:

Definition and initialization, Pointer arithmetic, Pointers and arrays, String

functions and manipulation, Dynamic storage allocation.


User defined Data types:

Enumerated data types, Structures. Structure arrays, Pointers to Functions

and Structures, Unions


File Access:

Opening, Closing, I/O operations.

CMS-A-CC-1-1-P: Digital Circuits Core Course-1: Practical, Credits - 02, Contact hours - 40.

 Combinational Circuits

1. Implementation of different functions (SOP, POS) using basic (AND, OR and NOT) logic gates.

2. Study and prove De-Morgan’s Theorem.

3. Realization of Universal functions using NAND and NOR gates.

4. Implementation of half (2-bit) and full adder (3-bit) using basic (AND, OR and NOT) and

Universal logic gates (NAND & NOR).

5. Implementation of half (2-bit) and Full Subtractor (3-bit) using basic (AND, OR and NOT) and

Universal logic gates (NAND & NOR).

6. Design and implement 1-Digit BCD adder using 7483/74283 and other necessary logic gates.

7. Design 4 to 1 multiplexer using basic or Universal logic gates and implement half and full

adder/subtractor.

8. Design and implement half and full adder /subtractor and other functions using multiplexers

74151/74153 and other necessary logic gates.

9. Cascading of Multiplexers.

10. Design 2 to 4 decoder using basic or universal logic gates.

11. Study 74138 or 74139 and implement half and full Adder/Subtractor and other functions.

12. 12. Implementation of 1-bit magnitude comparator using decoders (74138/74139) and other

necessary logic gates.

13. Cascading of Decoders.

14. Study magnitude comparators 7485.

15. Design and construct magnitude comparator (2-bit) using basic (AND, OR & NOT) and universal

(NAND/NOR) logic gates.

16. Design a display unit using Common anode or cathode seven segment display and decoders

(7446/7447/7448)

17. Design and implement 4-input 3-output (one output as valid input indicator) priority encoder

using basic (AND, OR & NOT) logic gates.

18. Study Priority Encoder IC 74147/74148.

19. Design a parity generator and checker using basic logic gates.



Sequential Circuits

1. Realization of SR, D, JK Clocked/Gated, Level Triggered flip-flop using basic or Universal logic

gates.

2. Conversion of flip-flops: D to JK, JK to D, JK to T, SR to JK, SR to D Flip-flop.

3. Design synchronous and asynchronous counters MOD-n (MOD-8, MOD-10) UP/ DOWN and

connecting Seven Segment Display along with decoder for display of counting sequence.

4. Construction of ODD/EVEN n-bit Synchronous Counter, where n is maximum 4.

5. n-bit binary arbitrary sequence synchronous counter where n is maximum 4.

CMS-A-CC-1-1-TH: Digital Logic Core Course-1: Theory, Credits-04, Contact hours - 60.

 Introduction to Computer fundamentals

Central Processing Unit (CPU), Primary and Secondary Storage devices, I/O Devices,

Classification of Computers: Super, Mainframe, Mini and Personal Computer, System and

Application Software.


Number Systems

Weighted and Non - Weighted Codes, Positional, Binary, Octal, Hexadecimal, Binary

Coded Decimal (BCD), Gray Codes, Alphanumeric codes, ASCII, EBCDIC, Conversion of

bases, 1's, 2's complement representation, Parity bits.

Single bit error detection and correcting codes: Hamming Code.

Fixed and Floating Point Arithmetic: Addition, Subtraction, Multiplication and Division.


Boolean Algebra

Fundamentals of Boolean Expression: Definition of Switching Algebra, Basic properties

of Switching Algebra, Huntington's Postulates, Basic logic gates (AND, OR, NOT), De-

Morgan's Theorem, Universal Logic gates (NAND & NOR), Minterm, Maxterm,

Minimization of Boolean Functions using K-Map up to four (4) variables, Two level and

multilevel implementation using logic gates, simplification of logic expressions.


Combinational Circuits

Adder & Subtractor:- Design and Construction of Half adders (2-bit) & Subtractor (2-

bit), Full Adder (3-bit) & Subtractor (3-bit) using basic logic gates (OR, AND, NOT) and

universal logic gates (NAND & NOR).

Multibit Adder:- Ripple Carry Adder, Carry Look Ahead (CLA) Adder, BCD Adder,

design & construct 1'S & 2'S Complement Adder/Subtractor unit using 4-bit full adder

units, 1-bit, 2-bit, 3-bit and 4-bit magnitude comparator using basic logic gates.

Data Selector-Multiplexer: Expansion (Cascading), function realization, Universal

function realization, Multifunction realization.

Encoders:- Realization of simple Encoders and priority Encoders using Basic and

Universal Logic gates.

Data Distributor:- De-multiplexer, Cascading, realization of various functions.

Chip Selector/Minterm Generator - Decoder- Function Realization, BCD Decoders,

Seven

Segment Display and Decoders.

Parity bit and Code Converters: Parity bit Generator/Checker, Gray to Binary code

converter, Binary to Gray Code Converter.

Sequential Circuits

Latch: Set/Reset (SR) using NAND and NOR gates, Gated S-R latches, D Latch, J-K

Latch, T Flip Flop, race around condition, Master-Slave J-K flip flop, Clock - Duty Cycle,

rising time, falling time, negative and positive edge detector circuits, edge triggered SR, D

and JK flip flop, flip-flop Conversions, flip-flops with preset/set and clear/reset

asynchronous inputs.

Registers: Serial Input Serial Output (SISO), Serial Input Parallel Output (SIPO), Parallel

input Serial Output (PISO), Parallel Input Parallel Output (PIPO), Universal Shift Registers.

Counters: Asynchronous Counter: UP/DOWN Counters, Mod - N Counters, BCD Counter

(Counter Construction using J-K and T Flip Flops).

Synchronous Counter: UP/DOWN Counters, Mod-N Counters, Ring & Johnson Counters.


Integrated Circuits (Qualitative study only)

Bipolar Logic Families: DTL, TTL NOT Gate, TTL NAND Gate, TTL NOR Gate, Open

Collector, Fan-in, Fan-out.

MOS Logic Families: NMOS, PMOS, CMOS, SSI, MSI, LSI and VLSI classification

(concepts only).

9. WAP to print a triangle of stars as follows (take number of lines from user):

 9. WAP to print a triangle of stars as follows (take number of lines from user):


                *

             *** 

          ***** 

        ******* 

      *********

8. Write a macro that swaps two numbers. WAP to use it.

 8. Write a macro that swaps two numbers. WAP to use it.

7. WAP to compute the factors of a given number.

 7. WAP to compute the factors of a given number.

6. Write a function to find whether a given no. is prime or not. Use the same to generate the prime numbers less than 100.

 6. Write a function to find whether a given no. is prime or not. Use the same to generate the prime numbers less than 100.

5. Write a function that checks whether a given string is Palindrome or not. Use this function to find whether the string entered by user is Palindrome or not.

 5. Write a function that checks whether a given string is Palindrome or not. Use this function to find whether the string entered by user is Palindrome or not.