Friday, November 27, 2020

FCS Important Questions for Mid-1 & 2

1. What is CPU and briefly explain about different type of input and out devices.

2. Define Flowchart and algorithm. Write the algorithm and flow chart “Find the area of a circle of radius r”

3. Describe the following

i. HUB

ii. SWITCH

iii. BRIDGE

iv. ROUTER

v. GATEWAY

---------------------------------------------------------------------------------

1. Define Operating System. Explain the following

i) Process life cycle

ii) PCB

iii) Process Scheduling

2. Define DBMS. Explain the following

i) Hierarchical model,

ii) Network Model,

iii) relational Model,

iv) Object-oriented Data Model

3. Briefly explain the following

i) Distributed Networking

ii) Peer-to-peer Computing

iii) Cloud Computing

iv) Grid Computing 

v) Wireless Networks

PPSUC Important Questions for Mid-1 & 2

1.Define a variable. Write a C program to perform arithmetic operations.

2.Briefly explain different types of Storage Classes

3.Briefly explain about the Pre-test loop and Post-test loops with a sample program to find the given number is Palindrome or not.

4.Briefly explain different types of arrays and write a program to perform the addition of two matrices.

-------------------------------------------------------------------------------------------------

1.Briefly explain the following with a sample program

A) Enumeration

B) Structure

C) Union

D) Typedef

2.Define Pointer and write a program to demonstrate the use of a pointer variable.

3.Briefly explain different types Dynamic Memory Allocation functions.

4. Briefly explain different type’s functions with examples and Write a program to swap two numbers with call by reference.

Tuesday, November 24, 2020

C Program to display multiple variables.

#include <stdio.h>

int main()

{

 char ch = 'A';

 char str[20] = "Welcome to C";

 float flt = 10.234;

 int no = 150;

 double dbl = 20.123456;

 printf("Character is %c \n", ch);

 printf("String is %s \n" , str);

 printf("Float value is %f \n", flt);

 printf("Integer value is %d\n" , no);

 printf("Double value is %lf \n", dbl);

 printf("Octal value is %o \n", no);

 printf("Hexadecimal value is %x \n", no);

 return 0;

}

Output:

Character is A

String is Welcome to C

Float value is 10.234000

Integer value is 150

Double value is 20.123456

Octal value is 226

********* PPSUC LAB EXAM PROGRAMS LIST ************

SET-I

1)Write a C program to calculate the distance between the two points.  

2)Write a program to read & display the student data using structure 

SET-II

1)Write a C program that accepts 4 integers p, q, r, s from the user where r and s are positive and p is even. If q is greater than r and s is greater than p and if the sum of r and s is greater than the sum of p and q print "Correct values", otherwise print "Wrong values".

2)Write a program in C to add two numbers using pointers 

SET-III

1) Write a C program to convert a string to a long integer.

2)Write a C program to Swapping numbers using Call by value with function

SET-IV

1)Write a program in C to display the n terms of even natural number and their sum

2)Write a program in C to find transpose of a given matrix. 

SET-V

1)Write a C program to compute the perimeter and area of a rectangle with a height of 7 inches and width of 5 inches. 3. Write a C program to display multiple variables.

2)Write a C program to Swapping numbers using Call by Reference with function 

SET-VI

1)Write a program in C which is a Menu-Driven Program to compute the area of the various geometrical shape

2)Write a C program to calculate the factorial of a given number

SET-VII

1)Write a C program to demonstrate the use of the pointer variable

2)Write a program in C to perform the addition of two matrix.                                                                               


                                                                                         


             

Monday, November 23, 2020

PROGRAMMING FOR PROBLEM SOLVING USING C (ES1201)

 UNIT I

Introduction to Computers: Creating and running Programs, Computer Numbering System, Storing Integers, Storing Real Numbers

Introduction to the C Language: Background, C Programs, Identifiers, Types, Variable, Constants, Input/output, Programming Examples, Scope, Storage Classes and Type Qualifiers.

Structure of a C Program: Expressions Precedence and Associativity, Side Effects, Evaluating Expressions, Type Conversion Statements, Simple Programs, Command Line Arguments.

UNIT II

Bitwise Operators: Exact Size Integer Types, Logical Bitwise Operators, Shift Operators.

Selection & Making Decisions: Logical Data and Operators, Two Way Selection, Multiway Selection, More Standard Functions

Repetition: Concept of Loop, Pretest and Post-test Loops, Initialization and Updating, Event and Counter Controlled Loops, Loops in C, Other Statements Related to Looping, Looping Applications, Programming Examples

UNIT III

Arrays: Concepts, Using Array in C, Array Application, Two Dimensional Arrays, Multidimensional Arrays, Programming Example – Calculate Averages

Strings: String Concepts, C String, String Input / Output Functions, Arrays of Strings, String Manipulation Functions String/ Data Conversion, A Programming Example – Morse Code

Enumerated, Structure, and Union: The Type Definition (Type def), Enumerated Types, Structure, Unions, and Programming Application

UNIT IV

Pointers: Introduction, Pointers to pointers, Compatibility, L value and R value

Pointer Applications: Arrays, and Pointers, Pointer Arithmetic and Arrays, Memory Allocation Function, Array of Pointers, Programming Application

Processor Commands: Processor Commands

UNIT V

Functions: Designing, Structured Programs, Function in C, User Defined Functions, Inter-Function Communication, Standard Functions, Passing Array to Functions, Passing Pointers to Functions, Recursion

Text Input / Output: Files, Streams, Standard Library Input / Output Functions, Formatting Input / Output Functions, Character Input / Output Functions

Binary Input / Output: Text versus Binary Streams, Standard Library, Functions for Files, Converting File Type.

TEXT BOOKS:

1. Programming for Problem Solving, Behrouz A. Forouzan, Richard F.Gilberg, CENGAGE

2. The C Programming Language, Brian W.Kernighan, Dennis M. Ritchie, 2e, Pearson

REFERENCES:

1. Computer Fundamentals and Programming, Sumithabha Das, Mc Graw Hill

2. Programming in C, Ashok N. Kamthane, Amit Kamthane, Pearson

3. Computer Fundamentals and Programming in C, Pradip Dey, Manas Ghosh, OXFORD

PROGRAMMING FOR PROBLEM SOLVING USING C LAB (ES1202)

 Exercise 1:

1. Write a C program to print a block F using hash (#), where the F has a height of six characters and width of five and four characters.

2. Write a C program to compute the perimeter and area of a rectangle with a height of 7 inches and width of 5 inches. 3. Write a C program to display multiple variables.

Exercise 2: 

1. Write a C program to calculate the distance between the two points. 2. Write a C program that accepts 4 integers p, q, r, s from the user where r and s are positive and p is even. If q is greater than r and s is greater than p and if the sum of r and s is greater than the sum of p and q print "Correct values", otherwise print "Wrong values".

Exercise 3:

 1. Write a C program to convert a string to a long integer.

2. Write a program in C which is a Menu-Driven Program to compute the area of the various geometrical shape.

3. Write a C program to calculate the factorial of a given number.

Exercise 4:

1. Write a program in C to display the n terms of even natural number and their sum.

2. Write a program in C to display the n terms of harmonic series and their sum. 1 + 1/2 + 1/3 + 1/4 + 1/5 ... 1/n terms.

3. Write a C program to check whether a given number is an Armstrong number or not.

Exercise 5:

1. Write a program in C to print all unique elements in an array.

2. Write a program in C to separate odd and even integers in separate arrays.

3. Write a program in C to sort elements of array in ascending order.

Exercise 6:

1. Write a program in C for multiplication of two square Matrices.

2. Write a program in C to find transpose of a given matrix.

Exercise 7: 1. Write a program in C to search an element in a row wise and column wise sorted matrix.

2. Write a program in C to print individual characters of string in reverse order.

Exercise 8:

1. Write a program in C to compare two strings without using string library functions.

2. Write a program in C to copy one string to another string.

Exercise 9:

1. Write a C Program to Store Information Using Structures with Dynamically Memory Allocation

2. Write a program in C to demonstrate how to handle the pointers in the program.

Exercise 10:

 1. Write a program in C to demonstrate the use of & (address of) and *(value at address) operator.

2. Write a program in C to add two numbers using pointers.

Exercise 11:

1. Write a program in C to add numbers using call by reference.

2. Write a program in C to find the largest element using Dynamic Memory Allocation.

Exercise 12:

1. Write a program in C to swap elements using call by reference.

2. Write a program in C to count the number of vowels and consonants in a string using a pointer.

Exercise 13:

1. Write a program in C to show how a function returning pointer.

2. Write a C program to find sum of n elements entered by user. To perform this program, allocate memory dynamically using malloc( ) function.

Exercise 14:

1. Write a C program to find sum of n elements entered by user. To perform this program, allocate memory dynamically using calloc( ) function. Understand the difference between the above two programs

2. Write a program in C to convert decimal number to binary number using the function.

Exercise 15:

1. Write a program in C to check whether a number is a prime number or not using the function.

2. Write a program in C to get the largest element of an array using the function.

Exercise 16:

1. Write a program in C to append multiple lines at the end of a text file.

2. Write a program in C to copy a file in another name.

3. Write a program in C to remove a file from the disk.

Saturday, October 3, 2020

Implementation of Queue using Array in C

click here for program Queue_array.c 

DS_UNIT_2_Material

click here for unit-2 notes 

Unit-2 Assignments

 

UNIT-II         ASSIGNMENT -1

1)    What is linked list explain the different types of linked list with examples.

2)   Define a Single linked list and describe the memory representation of single linked list with an example.

3)   Define a double linked list and describe the memory representation of double linked list with an example.

4)   Define a Circular linked list and describe the memory representation of circular linked list with an example.

 


UNIT-II         ASSIGNMENT -2

1)    What is polynomial equation and describe the polynomial equation with single linked list to perform polynomial addition and multiplication.

2)   What is Sparse matrix and write the representation of sparse matrix with linked list with addition and multiplication operation

3)   What are the different types of operations performed can be performed on single linked list and demonstrate them with examples.

4)   What are the different types of operations performed can be performed on double linked list and demonstrate them with examples.

5)   What are the different types of operations performed can be performed on circular linked list and demonstrate them with examples.

Wednesday, September 23, 2020

UNIT-1 Assignments

 

UNIT-1         ASSIGNMENT -1

 

1)    Define data structure and display the classification of data structures.

2)   What is the need of sorting and list out the different types of sorting techniques?

3)   What is the need the searching and list out the different types of searching techniques?

4)   Define ADT and write the advantages of ADT.

 

 

UNIT-1         ASSIGNMENT -2

 

1)    Briefly explain about the linear search algorithm with some example.

2)   Briefly explain about Quick sort algorithm with some example.

3)   Briefly explain about the binary search algorithm with some example.

4)   Briefly explain about the radix algorithm with some example.