COMPUTER SCIENCE AND APPLICATION
ONE STOP SOLUTION
Pages
- Model question papers1
- PHP - Placement Papers
- DOT(.) Net Placement Papers
- Software Engineering - Placement Papers
- Algorithms - Placement Papers
- JAVA - Placement Papers
- OS Placement Papers
- DBMS Placement Papers
- C Placement papers
- C++ Placement Papers
- Environment & Ecology
- Gate question with answer
- computer organization
- Model question-papers 2
- MICROPROCESSOR AND MICROCONTROLLER
- HOME
- 2018 model question papers for BCA,CST,MCA and & B.Tech students
- C Language 5 years solution of MAKAUT exam ( for BCA only)
- Python for Data Science - Course for Beginners (Learn Python, Pandas, NumPy, Matplotlib)
Saturday, November 06, 2021
Monday, August 09, 2021
Tuesday, July 27, 2021
Monday, July 26, 2021
Saturday, July 24, 2021
Friday, July 23, 2021
Wednesday, July 21, 2021
Tuesday, July 20, 2021
Monday, July 19, 2021
Friday, July 16, 2021
Thursday, July 15, 2021
Tuesday, July 13, 2021
Monday, July 12, 2021
Sunday, July 11, 2021
Saturday, July 10, 2021
Thursday, April 02, 2020
Friday, September 14, 2018
Monday, September 10, 2018
Monday, July 16, 2018
Wednesday, December 20, 2017
Saturday, November 18, 2017
software enginnering questions
SOFTWARE
ENGINEERING
Group
– A
- Answer any ten Questions:
i)
Two tools for
computing critical path and project completion times from activity networks are:
a) CPM
and PERT b) DRE and SQA c) FP and LOC d) none of these
ii)
The linear sequential model of software
development is also known as the:
a) Classical life cycle model b) Spiral model c) Waterfall model d) both a) and c)
software engineering short question answer
- What is
Acceptance Testing?
Testing conducted to enable a user/customer to determine whether to accept a software product. Normally performed to validate the software meets a set of agreed acceptance criteria. - What is Black Box
Testing?
Testing based on an analysis of the specification of a piece of software without reference to its internal workings. The goal is to test how well the component conforms to the published requirements for the component.
Wednesday, October 25, 2017
COMPUTER SCIENCE AND APPLICATION : Environment & Ecology
COMPUTER SCIENCE AND APPLICATION : Environment & Ecology: 1. Acid rains are produced by (a) excess NO 2 and SO 2 from burning fossil fuels (b) excess production of NH 3 by industry and coal...
Monday, August 10, 2015
Queue using Java
import java.io.*;
import java.util.Scanner;
class queue
{
int front,rear;
int item[]=new int[10];
}
import java.util.Scanner;
class queue
{
int front,rear;
int item[]=new int[10];
}
Stack using Java
import java.io.*;
import java.util.Scanner;
class stack
{
int top;
int item[]=new int[10];
}
import java.util.Scanner;
class stack
{
int top;
int item[]=new int[10];
}
Tuesday, May 26, 2015
Subnet & subnet calculation
By creating smaller IP networks (instead of having one large network), we can obtain better security, smaller collision and broadcast domains, and greater administrative control of each network. Think of a network like streets in a city. Each house on this network is known by the street and by the address. Think of the addresses on the houses as the hardware addresses of a host. For IP to communicate with a host, the IP address must be known, and the router connected to the network on which this host is located must also know the hardware address of the house.
Thursday, May 07, 2015
MCQs on Microprocessors
1. A memory system has a total of 8 memory chips, each with 12 address lines and 4 data lines. The total size of the memory system is
a) 16 Kbytes b) 48
Kbytes c) 32 Kbytes d) 64 Kbytes
Ans: Option a)
Each chip has 212 = 4096 x 4 bits
Capacity of 8 chips = 4096 x 4 x 8 = 16 Kbytes
Ans: Option a)
Each chip has 212 = 4096 x 4 bits
Capacity of 8 chips = 4096 x 4 x 8 = 16 Kbytes
Friday, May 01, 2015
Dependency Preserving Decomposition in DBMS
Decomposition - This means replacing a relation with a collection of smaller relations.
Abstract data type
An abstract data type (ADT) is a specification of a set of data and the set of operations that can be performed on the data.
Knapsack problem
Greedy method is best suited to
solve more complex problems such as a knapsack problem.
GREEDY METHOD
Greedy method is a method of choosing a subset of the data set as the solution set that results in some profit.
Thursday, April 30, 2015
IP Address
IP Version 4 addresses consist of 32 bits(0 through 31) partitioned into four groups of eight bits each. Each of this group is called an octet. It will be very difficult to understand and decipher the IP addresses if they were represented in the binary form and so they are reprsented in decimal form. Four decimal numbers separated by a dot, each standing for one octet. So, for example an IP address would look like this, 206.172.180.100.
CAPABILITY MATURITY MODEL
CMM stands for Capability Maturity Model. This was developed by Software Engineering Institute(SEI).
FUNDAMENTALS OF OPERATIONS ON FUZZY SETS
1. How to denote a fuzzy set?
IF X is the universe of discourse and x is a particular element of X, then a fuzzy set A defined on X may be written as a collection of ordered pairs:
A={(x,µA(A))}, x belongs to X
The pair (x, µA(A)) is called a singleton.
In crisp sets, a singleton is simply the element x by itself.
In fuzzy sets, a singleton is composed of two terms: x and µA(x).
A singleton is also written as µA(x)/x. That is by putting the membership function first followed by the ‘/’ symbol and is used to separate the function from x.
Singletons whose membership to a fuzzy set is 0 may be omitted.
A={(x,µA(A))}, x belongs to X
The pair (x, µA(A)) is called a singleton.
In crisp sets, a singleton is simply the element x by itself.
In fuzzy sets, a singleton is composed of two terms: x and µA(x).
A singleton is also written as µA(x)/x. That is by putting the membership function first followed by the ‘/’ symbol and is used to separate the function from x.
Singletons whose membership to a fuzzy set is 0 may be omitted.
PROPERTIES OF BINARY TREES
There are some basic properties of binary trees. It is better to know all of them and how to apply.For easier understanding I am giving it in a tabular form.
TYPES OF GRAMMAR
A grammar G is 4-tuple or quadruple G=(V,T,P,S) where
V is set of variables or non-terminals.
T is set of terminals.
P is set of productions.
S is the start symbol.
Each production is of the form α -> β where α is a non empty string of terminals and/or non-terminals and β is string of terminals and/or non-terminals including the null string. This grammar is also called as phase-structure grammar.
T is set of terminals.
P is set of productions.
S is the start symbol.
Each production is of the form α -> β where α is a non empty string of terminals and/or non-terminals and β is string of terminals and/or non-terminals including the null string. This grammar is also called as phase-structure grammar.
Normalization
A table is in 1NF if there and no duplicate rows in the table. Each cell is single-valued.
A table is in 2NF if it is in 1NF and if all non-key attributes are dependent on all of the key. A table is in 2NF if it is in 1NF and if it has no partial dependencies
Friday, April 24, 2015
Marge Two Dimension character array (with structure) in C langauge
#include<stdio.h>
#include<string.h>
struct name
{
char fname[10][10],lname[10][10],con[10][10];
};
#include<string.h>
struct name
{
char fname[10][10],lname[10][10],con[10][10];
};
Implement Two Dimentional array with dynamic memory allocation in C Language
#include<stdio.h>
#include<conio.h>
#include<alloc.h>
void main()
{
int r=3,c=3;//r=row,c=column
int *arr=(int*)malloc(r*c*sizeof(int));
#include<conio.h>
#include<alloc.h>
void main()
{
int r=3,c=3;//r=row,c=column
int *arr=(int*)malloc(r*c*sizeof(int));
Wednesday, April 22, 2015
Tuesday, April 21, 2015
Friday, April 10, 2015
National University of Educational Planning and Administration (NUEPA)
The National
University of Educational Planning and Administration (NUEPA),
established by the Ministry of
Human Resource Development, Government of India , is a premier organization
dealing with capacity building and research in planning and management of
education not only in India
but also in South Asia.
Friday, November 07, 2014
UGC NET DEC 2004 COMPUTER SCIENCE PAPER 2 SOLUTIONS
1. AVA = A is called:
(A) Identity
law
(B) De Morgan’s law
(C) Idempotant
law
(D) Complement law
Ans C
Friday, October 31, 2014
Database program (show,insert, delete, update records in a table) implemented by Java Language
import java.sql.*;
public class database4
{
Connection data;
Statement datarequest;
ResultSet result;
String c1,c2,p1;
boolean record;
database4()
{
String url="jdbc:odbc:student2014";
public class database4
{
Connection data;
Statement datarequest;
ResultSet result;
String c1,c2,p1;
boolean record;
database4()
{
String url="jdbc:odbc:student2014";
Database connection program implemented by Java Language
import java.sql.*;
public class database1
{
Connection data;
Statement datarequest;
ResultSet result;
String c1,c2,p1;
boolean record;
database1()
{
String url="jdbc:odbc:student2014";
public class database1
{
Connection data;
Statement datarequest;
ResultSet result;
String c1,c2,p1;
boolean record;
database1()
{
String url="jdbc:odbc:student2014";
Tuesday, October 21, 2014
JUNE 2009 PAPER 1 UGE NET
1. Good
evaluation of written material should not be based on :
(A) Linguistic expression
(B) Logical presentation
(C) Ability to reproduce whatever is read
(D) Comprehension of subject
(A) Linguistic expression
(B) Logical presentation
(C) Ability to reproduce whatever is read
(D) Comprehension of subject
The number of possible binary trees with 4 nodes is A) 10 B) 12 C) 14 D) 15
The number of possible binary trees with
4 nodes is
A) 10 B)
12
C) 14 D)
15
UGC NET COMPUTER SCIENCE MODEL QUESTION-ANSWERS
3. The number
of point to point links required in a fully connected network for 50
entities is
(A) 1250 (B) 1225
(C) 2500 (D) 50
Ans: (C)
2012 paper 3 ugc net exam question with answer
1) Granulairity refers to
(a) Size of a database (b) Size of a data item
(c) Size of a record (d) .........
Answer: (a) size of a data item
|
(2) R = (A, B, C, D). We decompose it into R1 = (A, B), R2
= (C, D). The set offunctional dependencies is: A → B, C → D,
Then decomposition is a
(a) Dependency preserving but
lossy
(b)Dependency preserving and
lossless
(c) lossless (d) Neither lossy
nor dependency preserving
Answer: (b) Dependency preserving
but lossy |
ax^2+bx+c=0
/* ax^2+bx+c=0*/
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main()
{
int a,b,c,d;
float x1,x2;
clrscr();
printf("\n enter the value of a,b,c=");
scanf("%d %d %d",&a,&b,&c);
#include<stdio.h>
#include<math.h>
#include<conio.h>
void main()
{
int a,b,c,d;
float x1,x2;
clrscr();
printf("\n enter the value of a,b,c=");
scanf("%d %d %d",&a,&b,&c);
consnent,vowel,special character
#include<stdio.h>
#include<string.h>
void main()
{
char str[100];
int i,v,c,sp,sc;
printf("enter the string");
i=0,v=0,c=0,sp=0,sc=0;
gets(str);
#include<string.h>
void main()
{
char str[100];
int i,v,c,sp,sc;
printf("enter the string");
i=0,v=0,c=0,sp=0,sc=0;
gets(str);
Rivised Simplex Method
#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
int bMATRIX[10][10];
void DETINV(int mSIZE, double **MATB);
void arg(int *a,int *b,int *n,int x,int y);
int det(int *p,int *n);
double **MATa;
double **MATB;
double *MATb;
#include<conio.h>
#include<math.h>
#include<stdlib.h>
int bMATRIX[10][10];
void DETINV(int mSIZE, double **MATB);
void arg(int *a,int *b,int *n,int x,int y);
int det(int *p,int *n);
double **MATa;
double **MATB;
double *MATb;
North West Corner Method
/*North West Corner Method*/
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int cost,i,j,msizerow,msizecol,matrix[10][10];
int r=0,c=0,p;
int supply[10],demand[10];
int value[10][10],rpos,cpos,rpre,cpre;
void firstiteration();
Draw Triangle in C Language
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int a[6][6],b[10];
int i,j,r,c,k=1;
int x1,x2,x3;
int y1,y2,y3;
int gdriver = DETECT, gmode;
clrscr();
initgraph(&gdriver,&gmode,"c:/tc/bgi");
#include<conio.h>
#include<graphics.h>
void main()
{
int a[6][6],b[10];
int i,j,r,c,k=1;
int x1,x2,x3;
int y1,y2,y3;
int gdriver = DETECT, gmode;
clrscr();
initgraph(&gdriver,&gmode,"c:/tc/bgi");
Solves the LPP by "SIMPLEX" method i.e. by table
#include <stdio.h>
#include <conio.h>
#define INFINITY 999
#define N 3
#define M 6
/************************************************************/
/***** Solves the LPP by "SIMPLEX" method i.e. by table *****/
/************************************************************/
void minimum(float *arr,int *arrminpos,int n);
/* Calculates the minimum valued position among the array arr having n elements. */
void display (float c[],float b[],float a[][M],int basic[]);
/* Display the table */
void displayframe(float c[M]);
#include <conio.h>
#define INFINITY 999
#define N 3
#define M 6
/************************************************************/
/***** Solves the LPP by "SIMPLEX" method i.e. by table *****/
/************************************************************/
void minimum(float *arr,int *arrminpos,int n);
/* Calculates the minimum valued position among the array arr having n elements. */
void display (float c[],float b[],float a[][M],int basic[]);
/* Display the table */
void displayframe(float c[M]);
OOP with JAVA basic intervies questions and answer
1. What is the difference between a constructor
and a method?
A constructor is a member function of a class that is used to create objects
of that class. It has the same name as the class itself, has no return type,
and is invoked using the new operator.A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.
UGC NET Paper1 solutions June 2006 2nd part
16. The function of mass communication of supplying information regarding
the processes, issues, events and
societal developments is known as :
(A)
content supply (B) surveillance
(C)
gratification (D) correlation
UGC NET JUNE 2005 COMPUTER SCIENCE PAPER 2 SOLUTIONS
1.
Which of the following is not true?
(A) Power of deterministic automata
is equivalent to power of non-deterministic automata.
(B) Power of deterministic
pushdown automata is equivalent to power of non-deterministic pushdown
automata.
(C) Power of deterministic Turing
machine is equivalent to power of non-deterministic
Turing machine.
(D) All the above
Some C Program
1. How would you round off a value 1.66 to 2.00 and truncate1.75 to 1.00 using C program?
#include<stdio.h>
#include<math.h>
void main()
{
float x=1.66;
float y=1.75;
printf(" %f %f",ceil(x),floor(y));
}
#include<stdio.h>
#include<math.h>
void main()
{
float x=1.66;
float y=1.75;
printf(" %f %f",ceil(x),floor(y));
}
Dec 2006 ugc net computer science paper 2 solutions
1. Which of the regular expressions corresponds to this
grammar ?
S →AB/AS, A→a/aA, B→b
(A) aa*b+ (B) aa*b (C) (ab)* (D) a(ab)*
S →AB/AS, A→a/aA, B→b
(A) aa*b+ (B) aa*b (C) (ab)* (D) a(ab)*
2. The proposition ~ q ∨ p is equivalent to :
(A) (B) (C) (D) ans : p->q
Animated Banner program with Java
Save this file as: bannar.java
……………………………………………………………………………………………
import java.awt.*;
import java.applet.*;
public class bannar extends Applet implements Runnable
{
String
msg="Hello World";
Thread t;
int state;
boolean flag;
public void
init()
{
}
Do U know?
1. If a computer on the network shares resources
for others to use, it is called ____
a. Server
b. Client
c. Mainframe
Answer : a
a. Server
b. Client
c. Mainframe
Answer : a
Implement following tables with c++
Person (name, address)-> base class
Employee (name, address, salary)-> derived class
Student (name, address, course) -> derived class
[Note: - Employee and Student are derived classes
that are derived features from the base class Person]
UGC NET DEC 2005 PAPER 2 SOLUTION
1. T is a graph
with n vertices. T is connected and has exactly n-1 edges, then :
(A) T is a tree
(B) T contains no cycles
(C) Every pairs of vertices in T is connected
by exactly one path
(D) All of these
Program to print specific date
#include<stdio.h>
#include<conio.h>
void main()
{
int
dd,mm,yy,i,a,a1,a2,b,b1,b2,d=0,sm=0;
clrscr();
printf("enter
date(DD/MM/YYYY):");
scanf("%d%d%d",&dd,&mm,&yy);
if(mm>12 ||
dd>31)
WBUT 2012-2013 JAVA SOLUTIONS PART4
1.
What is thread? What
is multi-threading? How to create a thread in a program? (WBUT 2012)
Thread: A thread, in the context
of Java, is the path followed when executing a program. All Java programs have
at least one thread, known as the main thread, which is created by the JVM at
the program’s start, when the main() method is invoked with the main thread. In
Java, implementing an interface and extending a class accomplish creating a
thread. Every Java thread is created and controlled by the java.lang.Thread
class.
Multi-threading: Java provides built in support for
multithreaded programming. A multithreaded program contains two or more parts
that can run concurrently. Each part of such a program is called a thread, and
each thread defines a separate path of execution. Thus, multithreading is a
specialized form of multitasking.
Combined transformation & Homogeneous Coordinates
A) Homogeneous Coordinates:
The homogeneous coordinates of a
non – homogeneous position vector [x y] are
[x` y` h] where x=x`/h, y=y`/h and h is any real number.
(Note that h=0 has special
meaning.)
One set homogeneous coordinates is
always of the form [x y 1] and all other homogeneous coordinates are of the
form [hx hy h] where h is any real number. The example of homogeneous
coordinates are [3 2], [3 2 1] or [6 4 2].
…………………………………………………………………………………………………………..
TCS Interview Question Paper with Answer
1.The C language terminator is
a. semicolon
b. colon
c. period
d. exclamation mark
WBUT 5Years Java Solutions for BCA,BTech,MCA Course
1.
What is local applet?
What is remote applet?
A LOCAL applet
is the one, which is stored on our computer system.when browser, try to access
the applet, it is not necessary for our computer to be connected to The
Internet.
A REMOTE applet is the one,
which is not stored on our computer system, and we are required to be connected
to the Internet.
Using Template in C++,Implement Bubble Sort method
#include<iostream.h>
template <class T>
void sort(T a[],int n)
{
T temp;
int i,j;
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
template <class T>
void sort(T a[],int n)
{
T temp;
int i,j;
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
Some graphical mathematical problem - solutions
* What pixels will be marked
in drawing a circle center (100,90) and radius 10? using Bresenham's algorithm
Ans:
Take x=0,y=r=10,d=3-2r=3-2*10=-17
Decision variable
(d)
|
x
|
y
|
Point with Center
(0,0)
|
Point with Center
(100,90)
|
0
|
10
|
(0,10)
|
(100,100)
|
|
-17
|
1
|
10
|
(1,10)
|
(101,100)
|
-11
|
2
|
10
|
(2,10)
|
(102,100)
|
-1
|
3
|
10
|
(3,10)
|
(103,100)
|
13
|
4
|
9
|
(4,9)
|
(104,99)
|
-5
|
5
|
9
|
(5,9)
|
(105,99)
|
17
|
6
|
8
|
(6,8)
|
(106,98)
|
11
|
7
|
7
|
(7,7)
|
(107,97) |
Overloading << and >> operator using friend function implemented in C++
#include<iostream.h>
class complex
{
private: double real,imag;
public: complex(){}
complex(double r,double i)
{
real=r;
imag=i;
}
class complex
{
private: double real,imag;
public: complex(){}
complex(double r,double i)
{
real=r;
imag=i;
}
Opening a file using C++
// OPEN A FILE
#include<iostream.h>
#include<stdio.h>
//#include<conio.h>
#include<fstream.h>
void main()
{
char c,fname[10];
ofstream out;
#include<iostream.h>
#include<stdio.h>
//#include<conio.h>
#include<fstream.h>
void main()
{
char c,fname[10];
ofstream out;
Class within Class or Containership or Composition or Has a / Kind of relationship
If two classes are related with one another there can be two types of relationship between them : a kind of relationship and a has a relationship. The kind of relationship is supported by inheritance and a has a relationship is supported by composition or containership.
Implemented a program with C++ that read a text file and creates another file that is identical to it
#include<fstream.h>
void main()
{
char source[67],target[67];//max allowable path length usually 66
char ch;
cout<<"\n Enter souce filename=";
cin>>source;
void main()
{
char source[67],target[67];//max allowable path length usually 66
char ch;
cout<<"\n Enter souce filename=";
cin>>source;
Using C++ overloading +,+= and = operator for append, concatenation and marge String
#include<iostream.h>
#include<string.h>
class marge
{
private: char name[20];
public:
marge()
{
strcpy(name,"");
}
#include<string.h>
class marge
{
private: char name[20];
public:
marge()
{
strcpy(name,"");
}
WBUT 5 YEARS JAVA MCQ SOLUTIONS FOR BCA,MCA & BTECH COURSE
2010
i) Which of these is known
as short-circuit and operator?
a) &&, b)
&, c) ? &, d) None of these.
ii) A constructor can be
inherited using the keyword?
a) Final, b) Static, c) Super, d) None of these.
Overloading new & Delete operator using C++
#include <iostream.h>
class overload {
public:
// Overloaded new
void* operator new (size_t sz)
{
cout <<"\nNew operator are used for allocated memory in Object Creation";
// Invoke the default new operator
return ::new overload();
}
class overload {
public:
// Overloaded new
void* operator new (size_t sz)
{
cout <<"\nNew operator are used for allocated memory in Object Creation";
// Invoke the default new operator
return ::new overload();
}
Wipro - Placement Papers
Memory management in C
The C programming language manages memory statically, automatically, or dynamically.
Static-duration
variables are allocated in main memory, usually along with the
executable code of the program, and persist for the lifetime of the
program
Automatic-duration variables are allocated on the stack and come and go as functions are called and return.
For static-duration and automatic-duration variables, the size of the allocation is required to be compile-time constant.
Some Important Small Java Script Programs
1. Write a Java Script program that show message “My First
JavaScript program”
<html>
<body>
<script>
document.writeln
( "My First JavaScript program")
</script>
</body>
</html>
VAM (Vogal Appro. Method)
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int max(int a[]);
int min(int a[10][10],char fx, int rc,int n);
int cal_diff(int a[10][10],int rc,char ch, int n);
void main()
{
int vam[10][10],v[10][10],avail[11][10],av[10],demand[11][10],dm[10];
int avdf[11][10],dmdf[11][10],rs[10][10];
int row,col,r,c,chk1=0,chk2=0;
#include<conio.h>
#include<stdlib.h>
int max(int a[]);
int min(int a[10][10],char fx, int rc,int n);
int cal_diff(int a[10][10],int rc,char ch, int n);
void main()
{
int vam[10][10],v[10][10],avail[11][10],av[10],demand[11][10],dm[10];
int avdf[11][10],dmdf[11][10],rs[10][10];
int row,col,r,c,chk1=0,chk2=0;
Gauss-Seidel method
#include<iostream.h>
#include<math.h>
void main()
{
float x[10],y[10],a[10][10];
int i,j,n,k,iteration;
cout<<"\nEnter the order of the matrix.......=";
cin>>n;
#include<math.h>
void main()
{
float x[10],y[10],a[10][10];
int i,j,n,k,iteration;
cout<<"\nEnter the order of the matrix.......=";
cin>>n;
LAGRANGES INTERPOLATION FORMULA
#include<iostream.h>
#include<conio.h>
main()
{
double xx;
double x[20],y[20];
int n,i;
cout<<"\nEnter the number of terms=";
cin>>n;
#include<conio.h>
main()
{
double xx;
double x[20],y[20];
int n,i;
cout<<"\nEnter the number of terms=";
cin>>n;
Newton's Backward formula
#include<iostream.h>
#include<conio.h>
#include<math.h>
double a[20][20],v;
int n,i,j;
void table()
{
cout<<"\nEnter the number of terms=";
cin>>n;
cout<<"\nEnter "<<n<<" no. x's value=\n";
#include<conio.h>
#include<math.h>
double a[20][20],v;
int n,i,j;
void table()
{
cout<<"\nEnter the number of terms=";
cin>>n;
cout<<"\nEnter "<<n<<" no. x's value=\n";
Newton's raphson method
#include<iostream.h>
#include<math.h>
double f(double x)
{
return(4*sin(x)-exp(x));
}
double f1(double x)
{
return(4*cos(x)-exp(x));
}
#include<math.h>
double f(double x)
{
return(4*sin(x)-exp(x));
}
double f1(double x)
{
return(4*cos(x)-exp(x));
}
Regula falsi method
#include<iostream.h>
#include<math.h>
float f(float x)
{
return(2*x-log10(x)-7);
}
void main()
{
float x1,x2,h,e;
int k=0;
cout<<"X1=";
cin>>x1;
#include<math.h>
float f(float x)
{
return(2*x-log10(x)-7);
}
void main()
{
float x1,x2,h,e;
int k=0;
cout<<"X1=";
cin>>x1;
Bezier curve with C Language
#include <stdio.h>
#include <stdlib.h>
#include <graphics.h>
#include <math.h>
void bezier (int x[4], int y[4])
{
int gd = DETECT, gm;
int i;
double t;
initgraph (&gd, &gm, "c:/tc/bgi");
#include <stdlib.h>
#include <graphics.h>
#include <math.h>
void bezier (int x[4], int y[4])
{
int gd = DETECT, gm;
int i;
double t;
initgraph (&gd, &gm, "c:/tc/bgi");
Print Clock with C Language
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
#include<dos.h>
void main()
{
int gdriver=DETECT,gmode;
double midx=350,midy=300;
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
#include<dos.h>
void main()
{
int gdriver=DETECT,gmode;
double midx=350,midy=300;
cohen sutherland line clipping algorithm with C Language
#include<stdio.h>
#include<graphics.h>
//#include<process.h>
void main()
{
int gd=DETECT, gm;
float i,xmax,ymax,xmin,ymin,x11,y11,x22,y22,m;
#include<graphics.h>
//#include<process.h>
void main()
{
int gd=DETECT, gm;
float i,xmax,ymax,xmin,ymin,x11,y11,x22,y22,m;
Shearing in c Language
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
void main()
{
int gdriver=DETECT,gmode;
double midx=350,midy=300;
double x1=300,y1=200,x2=400,y2=200,x3=400,y3=300,x4=300,y4=300;
double x11,y11,x22,y22,x33,y33,x44,y44;
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
void main()
{
int gdriver=DETECT,gmode;
double midx=350,midy=300;
double x1=300,y1=200,x2=400,y2=200,x3=400,y3=300,x4=300,y4=300;
double x11,y11,x22,y22,x33,y33,x44,y44;
Printing Smiling Face with C Language
#include<graphics.h>
#include<conio.h>
#include<stdlib.h>
main()
{
int gd = DETECT, gm, area, temp1, temp2, left = 25, top = 75;
void *p;
initgraph(&gd,&gm,"C:\\TC\\BGI");
#include<conio.h>
#include<stdlib.h>
main()
{
int gd = DETECT, gm, area, temp1, temp2, left = 25, top = 75;
void *p;
initgraph(&gd,&gm,"C:\\TC\\BGI");
Text Animation Program with C Language
#include<stdio.h>
#include<math.h>
#include<conio.h>
#include<graphics.h>
#define round(val) (int)(val+0.5)
void main()
{ int gd=DETECT,gm,sx,sy,tx,ty;
char text[50];
void move(int,int,int,int,char[]);
printf("Enter the text:");
#include<math.h>
#include<conio.h>
#include<graphics.h>
#define round(val) (int)(val+0.5)
void main()
{ int gd=DETECT,gm,sx,sy,tx,ty;
char text[50];
void move(int,int,int,int,char[]);
printf("Enter the text:");
Subtraction of two numbers using recursion Implemented by C++
#include<iostream.h>
int sub(int a, int b)
{
int count = 0;
if (a == b)
return 0;
int sub(int a, int b)
{
int count = 0;
if (a == b)
return 0;
Clear your doubt
1) What will be
output of the following program?
#include<stdio.h>
void main()
{
printf("india"-'A'+'B');
}
Output: ndia
UGC NET JUNE 2007 COMPUTER SCIENCE PAPER 2 SOLUTIONS
1. The following determiniotic finite automata
recognizes :
(D) None
of the above
(A)
Set of all strings containing ‘ab’
(B)
Set of
all strings containing ‘aab’
(C)
Set of
all strings ending in ‘abab’
Subscribe to:
Posts (Atom)