Featured

download 88 c program book

 DOWNLOAD 88 C Programs BOOK BY JT KALNAY

88 C Programs
“88 C Programs”, by JT Kalnay, contains C programs used to teach C programming. The programs are presented in an order that presents the simplest, most straightforward aspect of a new element first. Subsequent programs present the more subtle or confusing aspects of a new element.
Description
This book is not organized in a traditional chapter format. Instead I have chosen to include example programs that exhaustively illustrate the important points of C in an evolutionary manner. By working through these programs you can teach yourself C. I assume you already know how to program and are familiar with standard algorithms.
The programs that I present are not, by themselves, complete applications. The programs are “single-issue teaching programs”. Experienced programmers who are learning a new language have told me time and time again that they mainly want to see the functionality of the new syntactic and semantic elements. The programmers tell me that they will be able to think of the applicability of the feature to their project. When necessary, I provide a sample application to give a feel for how the new element might be employed.


download

bcsl-45 solved assignment

Course Code                           : BCSL-045
Course Title                             : Introduction to Algorithm Design Lab
Assignment Number              : BCA (IV)/045/Assignment/14-15
Maximum Marks                     : 50
Weightage                               : 25%
Last Dates for Submission    : 15th October, 2014 (For July 2014 Session)
15th April, 2015 (For January 2015 Session)
All questions carry eight marks each. Rest 10 marks are for viva-voce. Answer all The questions. All programmes are required to be run and tested including test Reports.
(i) A Palindrome is a string that reads the same forward and backward. Write an algorithm for determining whether a string of characters is palindrome.
Solution:-
C program to check whether it is a palindrome and also find the length of string
1. #include <stdio.h>
2. #include <string.h>
3.  
4. void main()
5. {
6.     char string[25], reverse_string[25] = {'\0'};
7.     int i, length = 0, flag = 0;
8.  
9.     printf("Enter a string \n");
        gets(string);
    /*  keep going through each character of the string till its end */
   for (i = 0; string[i] != '\0'; i++)
    {
        length++;
    }
    printf("The length of the string '%s' = %d\n", string, length);
    for (i = length - 1; i >= 0 ; i--)
    {
        reverse_string[length - i - 1] = string[i];
    }
   /*  Check if the string is a Palindrome */
    for (flag = 1, i = 0; i < length ; i++)
    {
        if (reverse_string[i] != string[i])
            flag = 0;

    }
    if (flag == 1)
       printf ("%s is a palindrome \n", string);
    else
       printf("%s is not a palindrome \n", string);
}
Output:-
Enter a string
  how  are you
The length of the string 'how  are you' = 12
how  are you is not a palindrome
-------------------------------------------------------------------
 Enter a string
   madam
 The length of the string 'madam' = 5
 madam is a palindrome
Algorithm:-
step 1 : start

step 2 : Declare variables char_string[25], reverse_string[25]
                    int i, length = 0, flag = 0;

step 3 : read value string.

step 4 : for (i = 0; string[i] != '\0'; i++)
         length++
step 5 : display 'the length of string =', string, length

step 6 : for (i = length - 1; i >= 0 ; i--)
        do reverse_string[length - i - 1] = string[i]
          /*  Check if the string is a Palindrome */

step 7 : for (flag = 1, i = 0; i < length ; i++)
                  if revers_string[i] ! = string[i]
                           do flag = 0
                        if flag == 1
                         display string is palindrome.
                         else 
                         display string is not palindrome.

step 8 : stop.
(ii) Find the largest number in an array and count a number of comparison operations as well as running time complexity of each statement and total complexity of the problem.
Solution:-
#include <stdio.h>
int main() {

    int i,n, count = 0;
    float arr[100];
    printf("Enter total number of elements(1 to 100): ");
    scanf("%d",&n);
    printf("\n");
    for(i=0;i<n;++i)  /* Stores number entered by user. */
    {
       printf("Enter Number %d: ",i+1);
       scanf("%f",&arr[i]);
    }

    for(i=1;i<n;++i)  /* Loop to store largest number to arr[0] */
    {
       if(arr[0]<arr[i]) /* Change < to > if you want to find smallest element*/
       {       
       count++;
       }
           arr[0]=arr[i];
    }
    printf("Largest element = %.2f \n",arr[0]);
    printf(“the number of comparison %d”, count);    
    return 0;
       getch();
}
Output:-
largestnum

Time Complexity of AlgorithmsTime complexity of an algorithm signifies the total time required by the program to run to completion. The time complexity of algorithms is most commonly expressed using the big O NotationTime Complexity is most commonly estimated by counting the number of elementary functions performed by the algorithm.
Calculating the Complexity
Now lets tap onto the next big topic related to Time complexity, which is How to Calculate Time Complexity. It becomes very confusing some times, but we will try to explain it in the simplest way.
Now the most common metric for calculating time complexity is Big O notation. This removes all constant factors so that the running time can be estimated in relation to N, as N approaches infinity. In general you can think of it like this:
statement;
Above we have a single statement. Its Time Complexity will be Constant. The running time of the statement will not change in relation to N
for(i=0; i &lt; N; i++)
              {
                     statement;
               }
The time complexity for the above algorithm will be Linear. The running time of the loop is directly proportional to N. When N doubles, so does the running time.
for(i=0; i &lt; N; i++)
    {
        for(j=0; j &lt; N;j++)
            {
              statement;
             }
    }
This time, the time complexity for the above code will be Quadratic. The running time of the two loops is proportional to the square of N. When N doubles, the running time increases by N * N.
(iii) Write a programme which interchanges the values the variable using only assignment operations. What is the minimum number of assignments operations required?
Solution:-
#include <stdio.h>
#include <string.h> 
/* Function Prototype */

void swap(int*, int *);
void main()
{
    int num1, num2;
printf("\nEnter two numbers:");
scanf("%d %d", &num1, &num2);
printf("\nThe numbers before swapping are Number1= %d Number2 = %d", num1, num2);
swap(&num1, &num2);   /* Call by Reference to function swap */
printf("\nThe numbers after swapping are Number1= %d Number2 = %d", num1, num2);

}
/* Code to swap two numbers using Assignment operator */
void swap(int *x, int *y)
  {
    *x = *x ^= *y;
    *y = *y ^= *y;
    *x = *x ^= *y;
}
Output:-
numsapThe minimum number of operator assigned is six because as we can see in the void swap function in that we used assignment operator six time to swap the value of num1 and num2.

BCA 3RD SEM SOLVED ASSIGNMENT

MCS 21 
Data and File Structures 
DOWNLOAD SOLVED ASSIGNMENT

MCS 23 
Introduction to Database Management Systems 
DOWNLOAD MCS-23 SOLVED ASSIGNMENT

MCS 14
 Systems Analysis and Design 


BCS 31 
Programming in C++ 
DOWNLOAD BCS-31 SOLVED ASSIGNMENT
BCSL 32 
C++ Programming Lab 
DOWNLOAD BCSL-32 SOLVED ASSIGNMENT
BCSL 33
 Data and File Structures Lab 


BCSL 34
 DBMS Lab

BCSL-32 SOLVED ASSIGNMENT


BCSL-32 SOLVED ASSIGNMENT





Course Code : BCSL-032
Title : C++ Programming Lab
Assignment Number : BCA (III)/BCSL-032/Assign/14-15
Maximum Marks : 50
Weightage : 25%
Last date of Submission : 15th October, 2014 (For July 2014 Session)
15th April, 2015 (For January 2015 Session)
Note: This assignment has four questions. Answer all the questions. These questions carry
40 marks. Rest 10 marks are for viva voce. You may give proper comments in your
programs to enhance the explanation. Please go through the guidelines regarding the
assignments given in the programme guide for the format of presentation.
download

Question 1:
Write a C++ program to find the average of 10 given numbers. This program should also find largest and smallest numbers in these 10 numbers. (5 Marks)
Question 2:
Write a C++ program to create an Account class with proper constructor(s) and destructor to
manage Bank Accout. Inherit Saving_Account and Current_Account e classes from Account
class and override method for deposit and withdrawal in Account class. Make necessary
assumptions wherever required. (15 Marks)
Question 3:
Write a program in C++ to overload “-” operator in such a way that ,when it is applied between
two string it return the difference of length of the two strings. (10 Marks)
Question 4:
Write a program in C++ to create a template for Queue data structure. (10 Marks)

bcs-31 solved assignment

BCS-31 SOLVED ASSIGNMENT

Course Code : BCS-031
Course Title : Programming in C++
Assignment Number : BCA(III)-031/Assign/14-15
Maximum Marks : 100
Weightage : 25%
Last Date of Submission : 15th October, 2014 (For July 2014 Session)
15th April, 2015 (For January 2015 Session)This assignment has five questions carrying a total of 80 marks. Answer all the questions.
Rest 20 marks are for viva-voce. You may use illustrations and diagrams to enhance explanations. Please go through the guidelines regarding assignments, given in the Programme Guide. Wherever required, you may write C++ program and take its printout along with its output as part of solution.


(a) What is Object Oriented Programming? Explain its features with example. (5 Marks)
(b) Write a C++ program to create Matrix class. This class should have functions to find the
sum and difference of two matrices. (9 Marks)
(c) Explain the usage of the following C++ operators with the help of an example program.
(a) Relational Operator
(b) Logical Operators
(c) Scope resolution operator
Question 2:
(a) Define the class Teacher with all the basic attributes such as Name, Department,Subjects,date_of_ joining, years_of_experience etc. Define constructor(s), member functions display_detail() for displaying the Teacher details. Use appropriate access control specifiers in this program. Also inherit Post_Graduate_Teacher from Teacher class.
(b) Explain the following terms in the context of object oriented programming. Also explain
how these concepts are implemented in C++ by giving an example program for
each. 
(a) Virtual Function
(b) Operator Overloading
Question 3:
(a) What is polymorphism? What are different forms of polymorphism? Explain
implementation of polymorphism with the help of a C++ program. 
(b) What is access control specifier ? Explain the need of different access control specifiers with example.

Question 4 :
(a) Explain the concept of copy constructor with the help of an example program. 
(b) What is an exception? How an exception is different from an error? Explain advantage of
exceptions handling in C++, with the help of an example program.
(c) What is data stream? Explain stream hierarchy in C++. 
Question 5:
(a ) What is template? Explain advantage of using template in C++? Write C++ program to
explain function template and class template. 
(b) What is inheritance? Explain the different types of inheritance supported by C++?
Explain whether constructors are inherited by derived class in C++ or not, write a
program in support of your claim and show the output. 

mcs-23 solved assignment

MCS-23 SOLVED ASSIGNMENT

Course Code : MCS-023
Course Title : Introduction to Database Management Systems
Assignment Number : BCA(III)/023/Assign /14-15
Maximum Marks : 100
Weightage : 25%
Last Dates for Submission : 15th October, 2014 (For July 2014 Session)
15th April, 2015 (For January 2015 Session)
This assignment has SIX questions. Answer all questions of total 80 marks. Rest 20 marks are for viva voce. You may use illustrations and diagrams to enhance your explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation. Answer to each part of the question should be confined to about 300 words. 
DOWNLOAD


Question 1: Construct an ER diagram for a Banking System. Clearly indicate the entities, relationships, cardinality and the key constraints. Also, derive the un normalized relational database tables with the help of this diagram.
Question 2: Explain decomposition of a database in database design. Why consolidation of a database after normalization is considered while designing a database. Explain with the help of a suitable example.
Question 3: (5X2=10 Marks)
(a) What is non-loss decomposition in database? How it is useful in database?
(b) Explain evaluation of expression process in query optimization.
Question 4:

 We have following relations:
Supplier(S#,sname,status,city)
Parts(P#,pname,color,weight,city)
SP(S#,P#,quantity)
Answer the following queries in SQL.
(i) Find name of supplier for city = „Delhi‟.
(ii) Find suppliers whose name start with „AB‟
(iii) Find all suppliers whose status is 10, 20 or 30.
(iv) Find total number of city of all suppliers.
(v) Find s# of supplier who supplies „red‟ part.
(vi) Count number of supplier who supplies „red‟ part.
(vii) Sort the supplier table by sname.
(viii) Find name of parts whose color is „red‟
(ix) Find parts name whose weight less than 10 kg.
(x) Find all parts whose weight from 10 to 20 kg.
(xi) Find average weight of all parts.
(xii) Find S# of supplier who supply part „p2‟
(xiii) Find name of supplier who supply maximum parts.
(xiv) Sort the parts table by pname.
(xv) Find the parts which weigh 10kg or above and are in „red‟ colour
Question 4: (10 Marks)
(a) Explain ACID properties of Transaction with suitable example.
(b) Explain TWO phase locking.

Question 5: 
(a) Consider table R(A,B,C,D,E) with FDs as A->B, BC->E and ED-> A. The table is in which normal form? Justify your answer.

(b) Explain system recovery procedure with check point record.

mcs-13 solved assignment

course Code : MCS-013
Course Title : Discrete Mathematics
Assignment Number : MCA(1)/013/Assign/2014-15
Assignment Marks : 100
Weightage : 25%
Last Dates for Submission : 15th October, 2014 (For July 2014 Session)
15th April, 2015 (For January 2015 Session)
download

There are eight questions in this assignment, which carries 80 marks. Rest 20marks are for viva-voce. Answer all the questions. You may use illustrations and diagrams to enhance the explanations. Please go through the guidelines regarding assignments given in the Programme Guide for the format of presentation.
Question 1
a) Make truth table for
i) p¨(q ~ r) ( ~p ~ q )
ii) ~p¨(~r q ) (~p r)
(4 Marks)
b)
If A = {1, 2, 3, 4, 5,6,7,8, 9} B = {1, 3, 5, 6, 7, 10,12,15}and
C = {1, 2,3, 10,12,15, 45,57} Then find (A B) C.
(2 Marks)
c)
Write down suitable mathematical statement that can be represented
by the following symbolic properties.
i) ( x) ( y) ( z) P
ii) ( x) ( y) ( z) P
(4 Marks)
Question 2
a)What is proof by mathematical induction? Show that for integers greater than zero: 2n >= n+1.

b) Show whether 17 is rational or irrational. (3 Marks)
c)
Explain concept of function with the help of an example. What is relation ? Explain following types of relation with example:
i) Reflexive
ii) Symmetric
iii) Transitive

Question 3
a)A survey among the players of cricket club, 20 players are pure batsman,10 players are pure bowler, 40 players are all rounder, and 3 players are wicket keeper batsman. Find the following:
i) How many players can either bat or bowl?
ii) How many players can bowl?
iii) How many players can bat?

b) If p and q are statements, show whether the statement  p¡÷q) q)] ¡÷ (~p ~q) is a tautology or not.
Question 4
a)Make logic circuit for the following Boolean expressions:
i) (x¡¬ y z) + (x y z)¡¬
ii) ( x' y) (y¡¬ z) (y z¡¬)
iii) (x y) (y z)

b)Explain principle of duality. Find dual of Boolean expression of the output of the following Boolean expression: ( x' y z) (x y¡¬ z) ¡¬ (x y z¡¬)

Question 5
a)Draw a Venn diagram to represent following:
i) (A B) (C~B)
ii) (A B) (B C)

b) if f(x) = log x and g(x) = ex, show that (fog)(x) = (gof)(x).
c) Explain inclusion-exclusion principle with example.
Question 6
a) What is pigeonhole principle? Explain its application with the help of an example.

b)If f : R „³ R is a function such that f (x) = 3x2 + 5, find whether f is one - one onto or not. Also find the inverse of f.

Question 7
a) Find how many 4 digit numbers are odd? (2 Marks)
b)How many different 10 professionals committees can be formed each containing at least 2 Project Delivery Managers, at least 2 Technical Architects and 3 Security Experts from list of 10 Project
Delivery Managers 12 Technical Architects and 5 Security Experts?

c)Explain concept of permutation with an example. How it is different from combination, explain with an example?

Question 8
a) What is Demorgan.s Law for Boolean algebra? Explain its application with example.

b)How many .words. can be formed using letter of STUDENT using each letter at most once:
i) If each letter must be used,
ii) If some or all the letters may be omitted.

c) Show whether ( p¡÷q) ( q ¡÷ p ) is a tautology or not using truth table.

Entri Populer

www.CodeNirvana.in

infolink adds

Powered by Blogger.

Translate

Total Pageviews

Copyright © ignou solved assignments | Distributed By My Blogger Themes | Designed By Code Nirvana