About Me

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

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

C++ program to find GCD two numbers a and b using user defined function. i.e. GCD(a,b) using Euclids algorithm

Write C++ program to find GCD two numbers a and b using  user defined function. i.e. GCD(a,b) using Euclids algorithm.   #include <iostre...