About Me

My photo
Vijayapur, Karnataka, India
I am interested in Teaching.

Saturday, 26 August 2017

Assignment 1: Programming in C and Data Structures

Dear student,
  You are hereby informed to answer the following questions by reading recommended books and given notes. Write the answers in your own technical sentences. You answers must contain some additional points rather than given points in my notes. (Read--Understand--Re write)

1. Define algorithm. Give one examples.(3m)
Definition=1 m, Explanation=1m Two Examples=1m

2. Define flowchart. Give one example.(3m)
Definition=1 m, Explanation=1m Two Examples=1m

3. Write algorithm and draw flowchart to find simple interest.(2+2=4m)

4. Write algorithm and draw flowchart to find area and circumference of a circle.(2+2=4m)

5. What is pseudocode? Give any three examples. (5m)
Definition=1 m, Explanation=1m Three Examples=3m

6. Discuss "Structure of C Program" with programming example.(10m)
Definition=1m Structure=2m Explanation of all elements=5X1=5m Programming exmaple=2m

7. What are C-tokens? List and explain in brief.(8m)
Definition=1m List=1m Explanation=6 x 1=6m

8. What are datatypes? List and discuss in brief with range of values supported by them.(8m)

Definition=1m List=1m Explanation with range of values =1x5
9. Write c program to find largest of two numbers using conditional operator (?:) (5m)

10. Write c program to find largest of three numbers using conditional operator (?:) (5m)

11. Write c program to find roots of a quadratic equation. (10 m)

12. Write c program to check, whether the year is leap year or not leap year. (5m)

13. Write c program to check whether the number N is PALINDROME or not.

14. Write c program to swap two values using temporary variable.(3m)

15. Write c program to swap two values without using temporary variable.(3m)

16. Solve questions from Question Papers. (10m)

17. What are formatted I/O functions? Explain with syntax and examples.
Definition=1m
Definition of scanf()=1m Syntax=1m Examples=1m
Definition of printf()=1m Syntax=1m Examples=1m

18. What is precedence and associativity of operator? Give example. (5m)
Definition=1+1 2m
Examples=2m

19. Discuss the following operators with examples. (15m)
Arithmetic, Relational, Logical, Assignment, Increment/decrement, bitwise and special operators.

20. What is type conversion?Discuss different types with examples.









Tuesday, 22 August 2017

Assignment 1 on Unix and Shell Programming (Updated)

Dear student,

Read recommended text books and given notes to understand and re-write the answers for following questions in assignment booklet in your own technical sentences to get good marks.


1. Discuss 'UNIX" operating system. (4m)
    Definition=1m  Discussion=3m

2.  List and explain the features of Unix o.s. (8m)
    List=1m Explanation= (7x1 =7m)
 
3. Discuss 'Unix Architecture' with neat diagram. (8m)
    Diagram with labeling =2m
    Explanation of Kernel, System calls, Shell, Utilities, Applications and Users carry (6x1)

4. Discuss the three Computing Environments of Unix with free hand sketch. (7m)
    List of environments=1m Free hand sketch=2m Explanation=3x1=3m

5. Discuss POSIX and Single Unix Specification. (6m)
    POSIX explanation=3m
    SUS explanation=3m

6. List and explain in brief about 'types of Unix commands'. (3m)

7. What is ls command? Discuss with options and examples.(6m)

Definition of ls command :1m
Minimum 5 options explanation with examples= 5m


8. Discuss the following Unix commands with examples in brief.
   echo, printf, cal, date, man, more, bc, ps, wc,tput clear,  who, whoami, passwd, exit,
Definition=1m Minimum 3 examples for each, If options are their, you need to explain.


9. Discuss 'system variable PATH' with example.

10. Explain the following commands with examples in brief.
      bc, man, more, tput clear, ps, wc

11. Who is superuser and discuss the functions of superuser.

12.  Discuss memory managements functions like df and du (imp)

13. Discuss "User Management" by system admin. (groupdadd, useradd, usermod and userdel) (imp)

14. Discuss "/etc/passwd and /etc/shadow" files. (imp)


Note: Submit the assignments before 30th August 2017.




Monday, 17 July 2017

Tips to get good marks in Viva Voce of CPL Lab

1. Be well dressed
2. Be polite
3. Be cool
4. Use these: Excuse me sir, Thank you sir, Good day sir.
5. DO NOT CARRY ANY CHITS OR MOBILES (VERY IMP)
6. CHECK CHITS NEAR BY YOUR COMPUTER TABLES.
7. Remember the file name like P1.C, P2.C, etc.
8. Do not forget to save the file frequently or after every modification i.e by pressing F2.
9. Do not forget to save before RUN the program.
10. Avoid the Change of Question procedure. If you change the Question, then you have to execute the new program compulsory.




Frequently asked questions.
1. What is variable?
2. What are constants?
3. Difference between variable and constant.
4. Name decision making statements.
5. Name loop statements.
6. What is an array?
7. What is structure?
8. Difference between array and structure.
9. What is pointer?
10. Difference between while and do while loop.
11. Difference between break and continue.
12. Name dynamic memory allocation functions.
13. Name pre-processors.
14. What is stack?
15. Applications of stack
16. What is queue?
17. Applications of queue
18. Name Input functions available in C.
19. Name Output functions available in C.
20. Difference between scanf and fscanf
21. Difference between printf and fprintf
22. Difference between call by value and call by reference.
23. Difference between automatic, global, static and register variables.
24. Name data types available in C.
25. What is the difference between PRIMARY and SECONDARY memory.
26. What is FILE?
27. Name file handling functions.

Computer Basics
1. What is computer?
2. Name input and output devices.
3. What is the unit of computer's memory?
4. Types of computer's memory.
5. What RAM and ROM stands for?
6. Examples for secondary memories.
7. Difference between computer program and software.

Good luck ! All the best! Be positive...






Sunday, 18 June 2017

PCD Module Wise Important Questions for Annual Examination

Module-I
1. What is pseudocode? Write pseudocode to find simple interest.

2. Discuss "Structure of C Program" with programming example.

3. What are C-tokens? List and explain in brief.

4. What is variable? Write rules for defining variables with valid and invalid example for each rule.
or
 What are identifiers? Write rules for defining identifiers with valid and invalid example for each rule.

5. What are datatypes? List and explain in brief with range of values supported by them.
6. Explain the following C-operators with examples.

    Relational, Logical, Bitwise, Special operators(sizeof(), comma) and conditional operator(?:).

7. What is meant by precedence and asociativity of operators? Explain with example.

8. Solve the following C- Expression.
    10<9+5&&500*10, 4||5&&3&&!7

9. What is type conversion(typecast)? List and explain types of type conversions with example.

10. Convert the following Mathematical expressions into C-expressions.
   


11. Write C programs for following.

To find simple interest.
To find area and perimeter of triangle  by reading breadth and height of it.
To find area and perimeter of triangle  by reading 3 sides of it.
To find area and perimeter of rectangle.
To convert the temperature reading from Fahrenheit to Celsius.
To swap two values using temporary variable.
To swap two values without using temporary variable.

Module-2
1. What are decision making (branching or conditional) statements ? Discuss any three with SYNTAX, FLOWCHART and PROGRAMMING example.
or
 Discuss the following with syntax,flow chart and programming example.
                    a) simple...if  b)if..else  c)nested if  d) else..if ladder (cascaded if )

2. Discuss "switch" statement with SYNTAX, FLOWCHART and programming example.

3. What are loop (repetitive or loop) statements ? Discuss any three with SYNTAX, FLOWCHART and PROGRAMMING example.
or
 Discuss the following with syntax,flow chart and programming example.
                    a) the while loop    b) the do...while loop    c) the for loop.

4. Write minimum 5 differences between while(pretest or entry controlled)  and do...while (post test or exit controlled) loop.

5. Write minimum 5 differences between break and continue statements.

6. What is goto (unconditional) statement? discuss with example.

7. Write the C programs for following.

To check, whether the year is leap or not leap year.
To find largest of two numbers.
To find largest of three numbers.
To reverse a number.
To check, whether the number is PALINDROME or NOT PALINDROME
To find factorial of n
To find gcd and lcm of two numbers.

Module-3

1. What is one dimensional array? Explain its declaration and initialization with syntax and example.

2. What is two dimensional array? Explain its declaration and initialization with syntax and example.

3. What is string? Explain its declaration and initialization with syntax and example.

4. Discuss the following string manipulating functions with examples.
    strlen, strcpy, strncpy, strcmp, strncmp, strcat. strncat, strlwr, strupr, strrev

5. Write the C programs for following.

To find addition of two one dimensional arrays.
To implement Bubble Sort technique.
To implement Linear Search technique.
To implement Binary Search technique.
To find addition of two 2D arrays
To find multiplication of two 2D arrays
To find length of a string without using built in function.

Functions:
1. Discuss the "Elements of User Defined Functions" with syntax and examples.

2. What are actual and formal parameters? Give programming example.

3. What is recursive function? Write recursive function to find factorial of 'n'.

4. Discuss 'parameter passing mechanisms' with programming example to each. (call by value and call by reference)
or
Write differences between 'call by value' and call by reference' (call by address)

5. Write C program to swap two values using defined function to swap two values.(call by reference) vimp.

6. Discuss the following with example.
automatic variables, global variable, static variables and register variables.

7.  Write C program that calls isprime(n) as a user defined function that returns 1 if the number is prime;otherwise, 0.

Module-4

Structure:

1. What is structure?Explain its declaration and initialization with syntax and examples.

2. Write differences between arrays and structures.

3. What is nested structure? Give programming example.

4. Discuss 'arrays of structure' with programming example.

5. Discuss 'structure and functions' with example.

6. What is typedef statement? Give examples.

7. Write C program to read and display 'n' students information (Roll No, Name, Marks, Grade) using arrays of structure.

File Management:

1. What is file? Discuss defining, opening and closing a file with syntax and example.

2. Discuss the following "File Manipulation Functions" with syntax and examples.
    getc() and putc()
    getw() and putw()
    fscanf() and fprintf()
    gets() and puts()

Module-5

1. What is pointer? Discuss its declaration and initialization with syntax and examples.

2. What is dynamic memory allocation? Explain the following functions with example.
     malloc(), calloc(), realloc(), free()

3. List and explain non-primitive data structures. (stack,queue,linked list, tree and graph)

4. What are preprocessors? list and explain 3 types.
   a) Macro substitution b) File inclusion c) Compiler control

5. Discuss 'stack' with explanation, figure and applications.

6. Discuss 'queue' with explanation, figure and applications.

7. Discuss 'linked list' with explanation and  figure.






Dear student,
Remember one thing i.e. if you write more then you get good and more marks.So, you need to explain the topics with quality points and SYNTAX  and PROGRAMMING EXAMPLE compulsory.

Tips:
1. Preferably, attempt that question first in which you are perfect.
2. For every question minimum one page answer.
3. For 10 Marks, minimum 3 pages. (front,back,front)
4. Wherever necessary, give the programming examples as you memorized for lab.
5. Write MORE to get MORE marks.
6. Your answers must be neat and tidy.
7. Do not forget to underline or bold the important words in your answer.
8. Draw rectangle box around SYNTAX compulsory.
9. Send you feedback or suggestion to cs.kusur@gmail.com
10. All the best...










Tuesday, 16 May 2017

PCD Assignment-IV for III I.A.

1. Write a c program to read and display 'n' students information(roll no, name and marks) using    
    arrays of structure.

2. Discuss 'nested structure' with example.

3. What is 'typedef statement'?Give examples.

4. What is file? Discuss defining, opening and closing a file with syntax and example.

5. Discuss the following "File Manipulation Functions" with syntax and examples.
    getc() and putc()
    getw() and putw()
    fscanf() and fprintf()
    gets() and puts()

6. What is pointer? Discuss its declaration and initialization with syntax and examples.

7. What is dynamic memory allocation? Explain the following functions with example.
     malloc(), calloc(), realloc(), free()

8. List and explain non-primitive data structures. (stack,queue,linked list, tree and graph)

9. What are preprocessors? list and explain 3 types.





Tuesday, 2 May 2017

One must know the answers for these questions of PCD

Know the following:

What are loop statements? 
What is while loop?
What is do-while loop?
What is for loop?
What is break statement?
What is continue statement?
What is goto statement?
What is an array?
What is 1D array?
What is 2D array?
What is string?
What is user defined function?
What are the differences between call by value and call by reference methods?
What is recursive function?
What is structure?
How to define structure and structure variables?
What are the differences between structure and array?
String handling functions.


Important programs for the practice:
To check, whether the number is Palindrome or not palindrome.
To find factorial of 'n' number.
To find sum and average of 1 to n numbers.
To check, whether the number 'n' is prime or not prime.
To find length of string without using built-in function.
To read and display Students Information(roll no, name, marks) using structure variable.



Write user defined function to find factorial of 'n' i.e. fact(n)
Write recursive function to find factorial of 'n' i.e. fact(n)
Write user defined function to find factorial of 'n' i.e. isprime(n)
C program to swap contents of two variables using user defined function using call by reference method.




Sunday, 23 April 2017

DAA Assignment -3

1. Discuss "Greedy Technique" with general plan and coin change problem as an example.

2. What is minimum spanning tree (MST)? Discuss.

3. List the algorithms used to find MST.

4. Discuss the following algorithms with "Algorithm" and example.
    Prim's Algorithm
    Kruskal's Algorithm.

5. Discuss "Dijkstra Algorithm" with algorithm and example.

6. Discuss "Huffman Codes and Huffman Trees" with example.

7. Discuss "Heaps and Heap Sort" algorithms with examples.

8. Discuss "Job Sequencing with deadlines" with example.

NOTE: Submit the assignments at the earliest......

Assignments on Functions (Assignment -IV)

1. What is function? Write its advantages with one programming example.

2. What is the difference between built-in and user defined function?

3. Discuss the "Elements of User Defined Functions" with explanation, syntax and examples.

4. Write user defined functions for following.
   
    To find sum of two integers.   i.e. sum(n1,n2)
    To find area of circle.              i.e. ac(r)
    To find factorial of 'n'              i.e. fact(n)
    To find largest of two numbers i.e. large(n1,n2)
    To find largest of three numbers i.e. max(n1,n2,n3)
    To find square and cube of a number. (Write two functions square(n) and cube(n) and call in main())
     To check, whether the number is prime or not prime i.e. by creating your own functions as isprime(n) that reurns 1 if the number is prime;otherwise, 0.

5. List and discuss categories of functions with programming examples.
   functions with arguments and return values.
   functions with no arguments and return values.
   functions with arguments and no return values.
   functions with no arguments and no return values.

6. What are actual and formal parameters? Discuss with example.

7. What is recursive function? Give programming example. i.e. Write recursive function to find factorial of 'n'. (vimp)

8. Discuss "Parameter Passing Mechanisms" with programming examples. (call by value and call by reference)) (vvimp)

9. Write difference between "call by value" and "call by reference" methods.

10. Write user defined function to swap the contents of two variables using call by reference(address) method. (vvimp)

11. Discuss storage classes used in C. i.e. auto, global, static and register variables. (vimp)









Tuesday, 18 April 2017

PCD Assignment-IV

1. What is one dimensional array? Explain its declaration and initialization with syntax and examples.
     (2+2+2=6 m)

2. What is two dimensional array? Explain its declaration and initialization with syntax and examples.
     (2+2+2=6 m)

3. List the advantages and disadvantages of working with arrays. (3+3=6m)
 
4. What is string? Explain its declaration and initialization with syntax and examples.
  (2+2+2=6 m)

5. Discuss the following "String Handling Functions" with syntax and examples (programming examples).
    strlen(), strcpy(), strncpy(), strcmp(), strncmp(), strcat(), strncat(), strupr(), strlwr(), strrev().
    Note: Explanation :1m, Syntax 1m, 2 simple examples and 1 programming example carry 3m.
    Each function carry= 5 m.

6. List the advantages and disadvantages of both linear and binary search techniques.

7. Solve questions from "Old VTU Question Papers" on "Arrays" and "Strings" topic.

8. Write the C programs for following.

C program to find 'sum' and average' of 'n' elements using 1D array.
C program to find largest and lowest of 'n' numbers using 1D array.
C program to sort 'n' elements using Bubble Sort technique.
C program to implement linear search technique.
C program to implement binary search technique.
C program to find the addition of two 2D arrays.
C program to find the product/multiplication of two 2D arrays.


NOTE:
Read, Understand and re-write the answers for the questions in assignment book in your own sentences.
Submit the assignment at the earliest.












 



Saturday, 1 April 2017

First I. A. Toppers in PCD

Congratulations !
First Topper: Miss. Oswal
Second Toppers: Miss Neha & Miss Lakkamma

Friday, 31 March 2017

PCD Assignment-III

1. What are loop statements? List different types of loop statements supported by C language.

2. Discuss "while" loop with syntax, flowchart and two programming examples.

3. Write C programs for following using "while" loop.
     To display 1 to n natural numbers.
     To display Squares of 1 to n numbers.
     To display multiple table of 'n' in multiple table format.
     if n=2,
             2 x 1 = 2
            2 x 2 = 4
             ....
           2 x 10 = 20

     To find sum and average of 1 to n numbers.
     To find factorial of n number.
     To check, whether the entered number is Palindrome or Not Palindrome.
     To find GCD of two numbers using Euclid's algorithm.

4. Discuss "do ... while" loop with syntax, flowchart and two programming examples.


5. Discuss "for" loop with syntax, flowchart and two programming examples.

6. Write the differences between break and continue statements.

7. What is goto statement? Discuss with programming example.

8. Write C programs for the following
    To check, whether the number is PALINDROME or NOT PALINDROME.
    To check, whther the number 'n' is PRIME or NOT PRIME.
    To display first 'n' fibonacci numbers.






Friday, 24 March 2017

DAA Assignment-II

  1. What is an algorithm? Explain the notion of algorithm with an example.
  2. Explain in brief about ‘Algorithm design and analysis process’ with a neat flowchart.
  3. Explain ‘Asymptotic Notations’ with definition and examples.
  4. Discuss the ‘Algorithm Analysis Framework’ in brief.
  5. Discuss basic efficiency classes.
  6. Discuss the algorithms specifications.
  7. Discuss General Plan for Analyzing Time Efficiency of Recursive Algorithms.
  8. Discuss General Plan for Analyzing Time Efficiency of Nonrecursive Algorithms.
  9. Write an algorithm to check whether all the elements in a given array are distinct and find its time complexity.
  10. Write an algorithm to find the product of two matrices A and B and find its time complexity.
  11. Write recursive algorithm to compute factorial of n and find its time complexity.
  12. Discuss and find the time complexity of “Tower of Hanoi” puzzle.
  13. Discuss divide-and-conquer algorithm design technique with example.
  14. Write recursive algorithm to find maximum and minimum of given list of array elements using divide and conquer technique.
  15. Write recursive and non-recursive algorithms for binary search.
  16. Write Merge Sort algorithm to find its worst case time efficiency.
  17. Write Quick Sort algorithm to find its best case time efficiency.
  18. Apply Quick Sort on the given list and draw recursive call tree:  5  3 1  9  8 2 4  7

Sunday, 19 March 2017

PCD Assignment-III

1. What are formatted I/O functions? Explain with syntax and examples.

2. What are unformatted I/O functions? Explain with syntax and examples.

3. Explain the following operators in brief with examples.
Arithmetic, Relational, Logical, Increment / Decrement  operators and Bitwise operators.

4. What is conditional operator? Explain with syntax and example.

5. What are special operators? list and explain.

6. What is precedence and associativity of operator? Explain with example.

7. Solve the following mathematical expressions using precedence and associativity rules.

    a)  8&&7+100/5==1%10-5<10+(10/2)
    b) 5 && 10<<5+10

8. What is type conversion? List and explain different types with examples.

9. Convert the any ten mathematical expressions(as discussed in class) into C expressions.

10. What are decision making statements? Explain the following with syntax and programming examples.
simple if, if ... else statement and nested if statement.

11. What is cascaded if statement? Explain with syntax and example.

12. Discuss "switch" statement with syntax, flowchart and programming example.

13. Write C programs for following

1). To check for leap year.

2). To find largest of three numbers.

3). To check, whether the machine is 16 bits machine or not.

4). If the user entered name is your's name and password is your roll number, then permit the user to find area and perimeter of rectangle.

5). To display the Grades like "Honour" (Avg>=70), "First Division" (Avg>=60 and Avg<70), "Second Division" (Avg>=50 and Avg<60), "Passed" (Avg>=35 and Avg<50), "Fail" (Avg<35) by using else if ladder statement.

6). To provide menu options to find "Area of Circle", "Area of Rectangle" and "Area of Triangle" to work accordingly using switch statement.

7). To simulate "Simple Calculator" using switch statement.

8) To find roots of a quadratic equation for three non-zero coefficients a, b and c. (Lab Program)

9) SOLVE QUESTION PAPERS.



 
   








Friday, 3 March 2017

Achievers of the week

1. Seminar on "String Processing" by Mr. Mahesh Gajakosh (2BL15CS045)

2. Seminar on "Graph Problems" by Miss. Nafisa Mujawar (2BL16CS407)



    
1. Mr. Manjunath Angadi IV Sem CSE A div.
    Design and Analysis of Algorithms:




2. Mr. Muragesh M II  Sem E Div. 2BL16CV049
    Programming in C and Data Structures

Tuesday, 28 February 2017

Design and Analysis of Algorithms: Assignment-II

1. Discuss the importance of "Asymptotic Notations" used by computer professionals.

Explanation of each notation: 1m
Definition of each notation: 2m
Figure showing the order of growth: 2m
Minimum 2 examples: 1m
Total=6 marks x 3 Notations=18 Marks.


2. Write short note on "little-oh notation" (1+1+1=3m)

3. Write the 'General Plan to find time efficiencies' for non-recursive algorithms with example. (5m)

4. Write pesudocode and find the time efficiency of following algorithms. (5 x 10m=50 marks)
    
    To find largest element in a list of n numbers.

     Pseudocode=3m
     Five Steps to find Time Efficiency= 5m
     Total=10m.

    Element Uniqueness Problem.
    Product of 2 matrices A and B. (Matrix Multiplication)
    To find the number of binary digits in a binary representation of decimal number.

5. Prove the following  THEOREM (5m)

    If t1(n) = O(g1(n)) and t2(n) = O(g2(n)) then
        t1(n)+t2(n) = O(max{g1(n),g2(n))



    




Sunday, 26 February 2017

PCD Assignment-II

1. Explain in brief about 'STRUCTURE OF C PROGRAM' with programming example. (1+2+2+2=7m)
Distribution of marks:
What is structure of C program= 1m,
Structure=2m,
Explanation of all parts=2m,
Programming Example=2m, Total=7 marks.
Write this answer twice, if you are not confident; otherwise, once in assignment book.

2. What are C-tokens? List and explain in brief with examples. (1+1+6=8 marks)
Distribution of marks:
What are C-tokens= 1m,
List=1m,
Explanation of all=6 X 1 m=6m
Total=8 marks.
Write this answer twice, if you are not confident; otherwise, once in assignment book.

3. Write the rules for defining identifiers/variables with valid and invalid examples for each rule. (2.5+2.5=5 marks)
Distribution of marks:
Minimum 5 rules = 2.55m,
Valid and Invalid Examples for each rule=2.5m
Total=5 marks.
Write this answer twice, if you are not confident; otherwise, once in assignment book.

4. What is variable? How do you define(declare) and initialize? Explain with syntax and examples.
(2+3+3=8 marks)
Distribution of marks:
Definition of variable = 2 m
Declaration of variables= Syntax+Explanation+Examples=3m
 Initialization of variables= Syntax+Explanation+Examples=3m
Total=8 marks.
Write this answer twice, if you are not confident; otherwise, once in assignment book.

5. Design and Develop C programs for following. (5 x 5=25 marks)

C program to find largest of two numbers using simple if statement.
C program to find largest of three numbers using simple if statement.
C program to find largest of two numbers using  if else statement.
C program to find largest of three numbers using if else statement.
C program to check, whether the year is leap year or not leap year.

Sunday, 19 February 2017

P C D Notes Page 1 of Module 1

Introduction to Computers and Programming
What is a computer?
Computer is an electronic computing device. It receives raw data as in input, process and generates desired as an output. If necessary, the input and output can be stored within computer’s secondary memory for future use.
Functions of a computer: The major four function of a computer system are as follows.
1. Input (reads raw data as input from user’s of machine)
2. Process (processes the input by using set of programs)
3. Output (result will be generated and displayed/printed)
4. Store (stores input & output within secondary memory)
What is computer program?
The set of instructions/statements/commands given to a machine by the programmer to do specific task is called computer program.
Who is programmer?
The person, who writes computer programs using(learning) computer programming languages like ALGOL, B, BCPL, C, C++, Fortran, COBOL, HTML, C#,Python, and Perl,etc.
Types of Computer Languages:
1. Machine level language (low level)
Machines knows, only 0s and 1s (binary digits i.e. bits) . It is difficult for the programmer to give instructions in machine level language to solve problem. Hence, researchers developed assembly and high level languages.
2. Assembly level language
The researchers developed assembly level languages to make computer programming easier. In this type, programmers will use mnemonics or abbreviations like ADD, SUB, MUL, DIV, STO, PRT, R1, R2, MOV, etc to give instruction to a machine.
e.g. MASAM (Microsoft’s Assembler)
Assembler: The translator or system program that converts the program written in assembly language in to machine language.
3. High level language
The researchers developed high level language to make computer programming easier. In this type, programmer makes the use of English words and mathematical operators and expression to write computer programs to do specific task. This language is easier to learn and write computer programs. Examples. ALGOL, B, BCPL, C, ANSI C, ISO C, C99, C++, Java, Python,etc.
Compiler: The translator or system program that converts the program written in high level language in to machine language at once.

Interpreter: The translator or system program that converts the program written in high level language in to machine language line by line (statement by statement).


Write a c program to display the “Hello World!” message on screen.
/* a c program to display the “Hello World!” message */
# include<stdio.h>
void main()
{
clrscr();
printf(“Hello World!”);
getch();
}

Write a c program to find addition of 2 unknown whole numbers.
/* a c program to find addition of two numbers */
# include<stdio.h>
void main()
{
int n1,n2,ans;
clrscr();
printf(“Enter any two numbers ”);
scanf(“%d%d”,&n1,&n2);
ans=n1+n2;
printf(“\n Addition is %d ”,ans);
getch();
}

Assignments: Write C programs for the following by your own.
1. To find addition of three unknown whole numbers.
2. To find addition of three unknown real numbers.
3. To find area and circumference of a circle.
4. To convert temperature reading from Fahrenheit to Celsius.
5. To find simple interest.
6. To find area and perimeter of a rectangle.
7. To find area of triangle by reading breadth and height of it.
8. To find area of triangle by reading 3 sides of it.
9. To swap (interchange) the contents of two variables (computer’s memories) using temporary variable.
10. To swap (interchange) the contents of two variables (computer’s memories) without using temporary variable.
11. To find square and cube of a number.

12. To extract and display last digit of entered number.

Friday, 17 February 2017

Design and Analysis of Algorithms Assignment-1

Dear student, you are hereby informed to answer the following questions by reading recommended text books in your own sentences.

1. What is an algorithm?
    (Definitions made by both Lavitin and Sahani with all necessary diagram and criteria)

2. Explain "The process of Design and Analysis of Algorithms" with neat diagram in brief.

3. Explain 10 specifications to write pseudocode in brief with examples. (Algorithm Specifications)

4. Write short note on "Analysis Framework".

5. Write algorithms to find gcd(m,n) by three methods.

Monday, 13 February 2017

PCD Assignment I

Dear student,
     Answer the following questions in your own sentences after reading the recommended text books.

1. What is computer?
2. List the major four functions of a computer system.
3. List the best features of a computer system.
4. List the areas in which computers are widely used to solve technical problems.
5. Write short note on "Types of computers memories".
6. What is the unit of computer's memory?
7. Fill in the blanks
    bit stands for ______________
    ___ bits = 1 nibble
   1 byte = ___ bits
   1024 bytes = ___ Kilo Bytes(KB)
   1024 KB = ___ Mega Bytes(MB)
   1024 MB = ___ Giga Bytes(GB)
   1024 GB = ___ Tera Bytes(TB)
   1024 TB = ___ Peta Bytes(PB)
8. What is computer program?
9. What is the difference between computer program and computer software?
10. Who is a computer programmer?
11. Who are end users?
12. Why do we learn and use computer languages.
13. Write short note on "Types of Programming Languages".
14. What is the difference between between assembler, compiler and interpreter.
15. Why do we write computer programs?


Write the C programs for following.
1. To display "Hello World!" message on the screen.
2. To display "Your residential address" on the screen.
3. To find addition of two unknown whole numbers.
4. To find addition,subtraction,multiplication,division of two unknown whole numbers.
5. To find area and circumference of a circle.
6. To find area and perimeter of a rectangle.
7. To find area of triangle of reading breadth (b) and height (h) of it.
8. To find area of triangle of reading 3 sides of it a, b and c.
9. To find simple interest.
10. To covert temperature reading from Fahrenheit to Celsius.
11. Write your own programs. (minimum 3)

Note: 1. Write the output of a written program.
          2. If you have your own personal computer, please write these programs and execute.
  
 
     
     






Sunday, 12 February 2017

Introduction Class : Programming in C and Data Structures.

Institute Vision
To emerge as a Widely Acknowledged (recognized/approved/accredited) Centre in Technical Education and Research to Cater (provide) the need of Society with a Futuristic (innovative) outlook.
Institute Mission
To Enrich (develop) Students with the essence of science and engineering knowledge, Professional ethics (moral values) and social values.
To instill (inspire/encourage) creativity and Research Temperament (character/spirit) to Reach the Greater Heights of Professional (expert/qualified/trained) Success.

Vision of Computer Science and Engineering Department
To be a Trend Setting Department in Technical Education and Research Providing Highly Competent, Efficient Manpower to Meet the Ever Changing Needs of the Country, Industry and the Society.
Mission of Computer Science and Engineering Department
To be an Ideal (perfect/best) Department Providing Quality Technical Education and Training to the Students in Tune with the Evolving Challenges and Social Needs through a Flexible and Innovative (new, novel) Learning Process Enabling the Students to Excel in their Professions and Careers with High Degree of Integrity(honesty, truth) and Ethical (moral, principled) Standards.

Who is an engineer?
A person who designs, builds, or maintains engines, machines, or structures.
What is engineering?
“Engineering can be defined as the branch of science and technology concerned with the design, building, and use of engines, machines, and structures.

Albert Einstein, one of the world's greatest scientists, hit the nail right on the head when he pondered the question 'what is engineering?'.
In simple terms, engineers identify a problem, and come up with a solution – often creating something completely new in the process.
Engineers are shaping the future by applying their skills to almost everything you can think of, from medicine to renewable energy, food technologies to sustainable mining. There really is no limit to what engineers can do.
Literature Survey on Engineering Colleges in India
There are 201 engineering colleges affiliated to VTU.
The state of Andhra Pradesh alone has more than 700 colleges.
511 Engineering colleges in 2006-07 in India.
3,345  Engineering colleges in 2014-15 in India.

Approximate number of engineering students passed out every year in India is as follows.
Passing Students x No. of Institutes in India i.e. 500 x 4000 = 20,00,000
20,00,000 (20 Lakhs) students will be passed out every as a engineering graduate student.


Programming in C and Data Structures (15PCD13/23)
Syllabus at Glance

Module I          Introduction to C Language
Module  II       Branching and Looping
Module III      Arrays, Strings and Functions
Module IV      Structures and File Management
Module V        Pointers and Pre Processors, Introduction To Data Structure

Course Outcomes (COs): On completion of this course, students are able to
C113.1 Explain the basic principles of programming in C language.
C113.2 Apply the knowledge of control statements to write computer programs.
C113.3 Write the computer programs using arrays, strings and functions.
C113.4 Design and develop solutions to real world problems by using computer programming skills.
C113.5 Construct structures and files to store data for further use.
C113.6 Define and use various data structures using pointers to handle huge data.

TEXT BOOKS:
T1. Brain W. Kernighan and Dennis M. Richie: The C programming Language, 2nd Edition, PHI, 2012.
T2. Jacqueline Jones & Keith Harrow: Problem Solving with C, 1st Edition, Pearson 2011.
REFERENCE BOOKS:
R1. Vikas Gupta: Computer Concepts and C Programming, Dreamtech Press 2013.
R2. R S Bichkar, Programming with C, University Press, 2012.
R3. V Rajaraman: Computer Programming in C, PHI, 2013.

Define the following terms.
  • Computer
  • Functions
  • Applications
  • Features
  • Program
  • Sofware (System & Application)
  • Programmer
  • Programming
  • Programming Languages
Write the C programs for following.
Too display "Hello World" message on the screen.
To display your residential address on the screen.
To read and find the addition of two unknown whole numbers.

Syllabus



Tuesday, 7 February 2017

DBA Viva Voce

What is Data?
Data is a collection of facts, such as numbers, words, measurements, observations or even just descriptions of things.
Data are plain facts. The word "data" is plural for "datum." When data are processed, organized, structured or presented in a given context so as to make them useful, they are called Information.
What is information?
Information is data that has been processed in such a way as to be meaningful to the person who receives it. It is anything that is communicated.
What is database?
A database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects.
The term "schema" refers to the organization of data as a blueprint of how the database is constructed (divided into database tables in the case of relational databases).
What is DBMS?
“A database management system (DBMS) is system software for creating and managing databases. The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data.”
“A database management system (DBMS) is a computer software application that interacts with the user, other applications, and the database itself to capture and analyze data.”
What is RDBMS?
RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. A Relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd.
What is SQL?
SQL stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc. The standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database.

Selecting Data

The select statement is used to query the database and retrieve selected data that match the criteria that you specify. Here is the format of a simple select statement:
select "column1"
  [,"column2",etc] 
  from "tablename"
  [where "condition"];
  [] = optional

Creating Tables

The create table statement is used to create a new table. Here is the format of a simple create table statement:
create table "tablename"
("column1" "data type",
 "column2" "data type",
 "column3" "data type");
Here are the most common Data types:
char(size)
Fixed-length character string. Size is specified in parenthesis. Max 255 bytes.
varchar(size)
Variable-length character string. Max size is specified in parenthesis.
number(size)
Number value with a max number of column digits specified in parenthesis.
date
Date value
number(size,d)
Number value with a maximum number of digits of "size" total, with a maximum number of "d" digits to the right of the decimal.

Inserting into a Table

The insert statement is used to insert or add a row of data into the table.
insert into "tablename"

 (first_column,...last_column)

  values (first_value,...last_value);

Updating Records

The update statement is used to update or change records that match a specified criteria. This is accomplished by carefully constructing a where clause.
update "tablename"

set "columnname" = 

    "newvalue"

 [,"nextcolumn" = 

   "newvalue2"...]

where "columnname" 

  OPERATOR "value" 

 [and|or "column" 

  OPERATOR "value"];

Deleting Records

The delete statement is used to delete records or rows from the table.
delete from "tablename"

where "columnname" 

  OPERATOR "value" 

[and|or "column" 

  OPERATOR "value"];

Drop a Table

The drop table command is used to delete a table and all rows in the table.
drop table "tablename"


Keys in DBMS

Key plays an important role in relational database; it is used for identifying unique rows from table. It also establishes relationship among tables.

Types of keys in DBMS

Primary Key – A primary is a column or set of columns in a table that uniquely identifies tuples (rows) in that table.
Super Key – A super key is a set of one of more columns (attributes) to uniquely identify rows in a table.
Candidate Key – A super key with no redundant attribute is known as candidate key
Alternate Key – Out of all candidate keys, only one gets selected as primary key, remaining keys are known as alternate or secondary keys.
Composite Key – A key that consists of more than one attribute to uniquely identify rows (also known as records & tuples) in a table is called composite key.
Foreign Key – Foreign keys are the columns of a table that points to the primary key of another table. They act as a cross-reference between tables.

Super Key

A Super key is any combination of fields within a table that uniquely identifies each record within that table.

Candidate Key

A candidate is a subset of a super key. A candidate key is a single field or the least combination of fields that uniquely identifies each record in the table. The least combination of fields distinguishes a candidate key from a super key. Every table must have at least one candidate key but at the same time can have several.
1. Candidate Key: are individual columns in a table that qualifies for uniqueness of all the rows. Here in Employee table EmployeeID & SSN are Candidate keys.
2. Primary Key: is the columns you choose to maintain uniqueness in a table. Here in Employee table you can choose either EmployeeID or SSN columns, EmployeeID is preferable choice, as SSN is a secure value.
3. Alternate Key: Candidate column other the Primary column, like if EmployeeID is PK then SSN would be the Alternate key.
4. Super Key: If you add any other column/attribute to a Primary Key then it become a super key, like EmployeeID + FullName is a Super Key.
5. Composite Key: If a table do have a single columns that qualifies for a Candidate key, then you have to select 2 or more columns to make a row unique. Like if there is no EmployeeID or SSN columns, then you can make FullName + DateOfBirth as Composite primary Key. But still there can be a narrow chance of duplicate row.
What is ER diagram?
An entity relationship model, also called an entity-relationship (ER) diagram, is a graphical representation of entities and their relationships to each other, typically used in computing in regard to the organization of data within databases or information systems.
Let us now learn how the ER Model is represented by means of an ER diagram. Any object, for example, entities, attributes of an entity, relationship sets, and attributes of relationship sets, can be represented with the help of an ER diagram.

Entity

Entities are represented by means of rectangles. Rectangles are named with the entity set they represent.
Entities in a school database

Attributes

Attributes are the properties of entities. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity (rectangle).
Simple Attributes
If the attributes are composite, they are further divided in a tree like structure. Every node is then connected to its attribute. That is, composite attributes are represented by ellipses that are connected with an ellipse.
Composite Attributes
Multivalued attributes are depicted by double ellipse.
Multivalued Attributes
Derived attributes are depicted by dashed ellipse.
Derived Attributes

Relationship

Relationships are represented by diamond-shaped box. Name of the relationship is written inside the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it by a line.

Binary Relationship and Cardinality

A relationship where two entities are participating is called a binary relationship. Cardinality is the number of instance of an entity from a relation that can be associated with the relation.
·        One-to-one − When only one instance of an entity is associated with the relationship, it is marked as '1:1'. The following image reflects that only one instance of each entity should be associated with the relationship. It depicts one-to-one relationship.
One-to-one
·        One-to-many − When more than one instance of an entity is associated with a relationship, it is marked as '1:N'. The following image reflects that only one instance of entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts one-to-many relationship.
One-to-many
·        Many-to-one − When more than one instance of entity is associated with the relationship, it is marked as 'N:1'. The following image reflects that more than one instance of an entity on the left and only one instance of an entity on the right can be associated with the relationship. It depicts many-to-one relationship.
Many-to-one
·        Many-to-many − The following image reflects that more than one instance of an entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts many-to-many relationship.
Many-to-many

Participation Constraints

·        Total Participation − Each entity is involved in the relationship. Total participation is represented by double lines.
·        Partial participation − Not all entities are involved in the relationship. Partial participation is represented by single lines.


PARALLEL COMPUTING (BCS702) Program 6: Write a MPI program to demonstration of deadlock using point to point communication and avoidance of deadlock by altering the call sequence

  Department of Computer Science & Engineering, BLDEACET, Vijayapura 13 Lab Manual : PARALLEL COMPUTING (BCS702) Program 6: Write a MPI ...