| EXAM TIME TABLE OF 5th SEMESTER |
GTU`s Complete solution for the decipline computer sci. & engg. , Computer Engg. and IT
Friday, December 10, 2010
COMPUTER NETWORKS(practical 8)
1. What is DNS?How it is significant in real world.
2. Explain about file transfer protocol in brief.
3. What are the component of DNS explain in brief.
4. What is email ? What are the function of email ? explain component of email ?
5. Write full form of following and explain in brief
1) SMTP
2) IMAP4
3) MIME
4) POP3
2. Explain about file transfer protocol in brief.
3. What are the component of DNS explain in brief.
4. What is email ? What are the function of email ? explain component of email ?
5. Write full form of following and explain in brief
1) SMTP
2) IMAP4
3) MIME
4) POP3
COMPUTER NETWORKS(practical 7)
1. What is ISO/OSI model?
2. Draw and Explain each and every layer of OSI model.
3. What is difference between connection less and connection oriented.
4. What is the difference between reliable and unreliable communication Explain with examples.
5. What is the difference synchronous and asynchronous communication.
6. What is the difference between ISO/OSI layer and TCP/IP model.
2. Draw and Explain each and every layer of OSI model.
3. What is difference between connection less and connection oriented.
4. What is the difference between reliable and unreliable communication Explain with examples.
5. What is the difference synchronous and asynchronous communication.
6. What is the difference between ISO/OSI layer and TCP/IP model.
Saturday, November 13, 2010
Program to check whether number is prime or not in java
Write a Java program to find whether the given number is prime or not.
import java.io.*;
class prime{
public static void main(String[] args)
{
int num,i;
try{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter number:");
num=Integer.parseInt(br.readLine());
for (i=2; i < num ;i++ )
{
int n = num%i;
if (n==0)
{
System.out.println("not Prime!");
break;
}
}
if(i == num)
{
System.out.println("Prime number!");
}
}catch(IOException e){}
}
}
*+*+*+*+*+*+*+*OUTPUT+*+*+*+*+*+*+*+*+*+
Enter number:
19
Prime number!
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
import java.io.*;
class prime{
public static void main(String[] args)
{
int num,i;
try{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter number:");
num=Integer.parseInt(br.readLine());
for (i=2; i < num ;i++ )
{
int n = num%i;
if (n==0)
{
System.out.println("not Prime!");
break;
}
}
if(i == num)
{
System.out.println("Prime number!");
}
}catch(IOException e){}
}
}
*+*+*+*+*+*+*+*OUTPUT+*+*+*+*+*+*+*+*+*+
Enter number:
19
Prime number!
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
Monday, November 8, 2010
MID SEM EXAM SYLLABUS OF IAP
Two assignment given by Reena ma`am and mid sem exam question by RJP sir.
also prepare Delegate and event programs from file.
also prepare Delegate and event programs from file.
MID SEM EXAM SYLLABUS IN JAVA
In Java programming all assignment given in Java section.
MID SEM EXAM SYLLABUS OF MICROPROCESSOR
In microprocessor and peripheral chips all post posted below .
MID SEM EXAMS SYLLABUS IN COMPUTER NETWORKS
In mid semester exam syllabus of computer network is 1 to 5 practical of RJP sir and question given by MJP ma`am
Command Line argument + IndexOf() program
Write a program that take a string and a character to be searched from command line input in the string
and count the occurrence of that character in string and also display the appropriate message.
//file name is cmd.cs
/* pass string without space in command line argument
*/
using System;
public class cmd{
public static void Main(string []args)
{
string str=args[0];
string s=args[1];
int ind=str.IndexOf(s);
Console.WriteLine("occurrence of {0} in {1} is : {2} ",s,str,ind);
}
}
_________________________________
*+*+*+*+*+*+OUTPUT*+*+*+*+*+*+*+
csc cmd.cs
cmd i_just_want_say_hi h
occurrence of h in i_just_want_say_hi is : 16
__________________________________
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
ORATOR OVERLOADING IN C#
Write a program to add two complex number by overloading + operator.
using System;
public class Complex
{
public int real;
public int imaginary;
public Complex(int real, int imaginary)
{
this.real = real;
this.imaginary = imaginary;
}
public static Complex operator +(Complex c1, Complex c2)
{
return new Complex(c1.real + c2.real, c1.imaginary + c2.imaginary);
}
public void show()
{
Console.WriteLine("{0} + {1}i", this.real, this.imaginary);
}
}
class overloadplus
{
static void Main()
{
Complex num1 = new Complex(12, 8);
Complex num2 = new Complex(21, 4);
Complex sum = num1 + num2;
Console.WriteLine("First complex number:");
num1.show();
Console.WriteLine("Second complex number:") ;
num2.show();
Console.WriteLine("The sum of the two numbers:");
sum.show();
}
}
+++++++++++++++OUTPUT+++++++++++++++++++++
First complex number:
12 + 8i
Second complex number:
21 + 4i
The sum of the two numbers:
33 + 12i
************************************************
Tuesday, November 2, 2010
IAP Question(mid sem exams by RJP sir)
- Explain the compilation process of program in .net.
- Differentiate for loop and for each loop of c# with suitable example.
- Explain component of .net with suitable diagram.
- What is enumeration ? Explain with example.
- Explain with example the types of inheritance .
- What is delegate ? compare delegate of .net with call back method of c,c++ and also write to step to create and use delegate.
- Differentiate structure and class with suitable example.
- Explain at least six methods of string class with suitable example.
- True and False:
- Logical operator have same level of precedence.
- Multi line comment start with /* ---- */.
- in C# program we can include multiple main method.
- Boxing allow to convert the value type to reference type then again to value type .
- Bitwise unary and comperation overloaded in pack.
- Unmanaged code do not run under the control of CLR.
- An assembly is a logical unit that contain non compile code.
- Write a program to add two complex number by overloading + operator.(SOLUTION)
- Write a program that take a string and a character to be searched from command line input in the string and count the occerance of that character in string and also display the appropriate message. (SOLUTION)
Tuesday, October 26, 2010
Microprocessor(Program to find out largest number)
A program to find out the largest number from a given unordered array of 8-bit numbers,stored in the location starting from a known address.
Note: ";" these are the comment in program for better understanding.
Logic: Compare the i th number of the series with the (i+1)th number using CMP instruction .it will set the flags appropriately depending upon whether the i th number or the (i+1)th number is greater.if the i th number is greater than (i+1)th number is greater than (i+1)th, leave it in the AX(any register may be used).Otherwise load the (i+1)th number in AX,replacing the i th number in AX.The procedure is repeated till all the members in the array have been compared.
ASSUME CS:CODE,DS:DATA
DATA SEGMENT ; Data segment starts
LIST DB 52H,23H,56H,45H-- ; List of byte numbers
COUNT EQU OF ; Number of bytes in the list
LARGEST DB 01H DUP(?) ; One byte is reserved for the largest no.
DATA ENDS ; Data segment ends
CODE SEGMENT ; Code segment starts
START: MOV AX,DATA ; Initialize data segment
MOV DS,AX
MOV SI,OFFSET LIST
MOV CL,COUNT ; Number of bytes in CL
MOV AL,[SI] ; Take the first number in AL
AGAIN: CMP AL,[SI+1] ; and compare it with the next number
JNL NEXT
MOV AL,[SI+1]
NEXT: INS SI ; Increment pointer to the byte list
DEC CL ; Decrement counter
JNZ AGAIN ; If all the nos. are compared,point to result
MOV SI,OFFSET LARGEST ; Destination and store it
MOV [SI],AL
MOV AH,4CH ;return to DOS
INT 21H
CODE ENDS
END START
Note: ";" these are the comment in program for better understanding.
Monday, October 25, 2010
Microprocessor Qusetion(Mid sem Exam)
- Explain architecture of 8086 Microprocessor.
- Draw Pin-diagram of 8086 Microprocessor.Explain regarding minimum and Maximum mode.
- Explain memory segmentation of 8086 Microprocessor.
- Write different types of addressing mode of 8086 Microprocessor and Explain any two.
- Explain any three instruction of 8086 Microprocessor.
- Write a program for comparing two numbers.
- Write a program conversion of BCD to Decimal number.
- Write a program to find out the largest number from a given unorder array of 8-bit number stored in the location starting from a known address.(Solution)
- What do you mean by assembler directive .Explain the following Directive with example:
- DB
- ASSUME
- ENDP
- GLOBAL
- SEGMENT
Saturday, October 23, 2010
IAP Question( by RJP sir)
- Explain the different types of class member and types of class.
- Explain operator overloading with example.
- Explain garbage collection and free unmanaged resources in detail.
- Explain the idea of publisher and subscriber with example.
- Explain various methods of inheritance with example.
- Write a program which illustrate the use of name space.
- Explain data types in C#.
- Give syntax of FOR EACH statement .
- Explain following string methods.
- compare()
- Insert()
- Replace()
- Concate()
- Delete
- What is an interface.Give the syntax of defining interface.
- What is compile time and run time error.
- Difference between partial and static class.
- What is exception .Explain exception handling with its syntax.
- Write a program which catches the division by zero exception and display appropriate message.
Write a program which illustrate the use of NumberFormateException in JAVA.(solved by me)
class NFE
{
public static void main(String[] args)
{
try
{
String s = "33";
int i = Integer.parseInt(s);
System.out.println("int value = " + i);
s = "computer";
i = Integer.parseInt(s);
// this line of code will never be reached//
System.out.println("int value = " + i);
}
catch (NumberFormatException e)
{
System.out.println("ERROR:"+e);
}
}
}
output:-
javac NFE.java
java NFE
int value = 33
ERROR:java.lang.NumberFormatException: For input string: "computer"
Friday, October 22, 2010
Microprocessor and peripherals chips(ch-3)
- Explain different addressing mode of 8086 microprocessor.
- Explain base index of 8086 microprocessor.
- Write different data transfer technique in detail.
- Explain following instructions(All).
Microprocessor and peripherals chips(ch-1)
- Draw pin diagram of 8086 microprocessor and explain in detail.
- Draw architecture of 8086 microprocessor and explain in brief.
- Explain register organization of 8086 microprocessor.
- Explain Memory segmentation of 8086 microprocessor.
- Draw pin diagram of 8086 microprocessor regarding minimum and maximum mode.
COMPUTER NETWORKS(Mid sem exam question by MJP ma`am)
- Explain the functionality of star topology ,also write down the advantages and disadvantages of star topology.
- Write a short note on following
- Mesh topology
- Bus topology
- Write down advantages and disadvantages of ring and tree topology.
- Write short note on following
- Print server
- File server
- Explain the functionality of each layer of OSI model in detail.
Thursday, October 21, 2010
JAVA (assignment-3 by CSP sir)
- Explain inner class.
- Explain static and final keyword with example.
- Explain command line argument and write a program that take 10 number from command line argument and display maximum number.
- What is recursion ? Explain with example.
- Explain function overloading with suitable example.
- Explain following string function
- toString()
- insert()
- getChars()
- indexOf()
- Explain following string methods with example
- length()
- charAt()
- compareTo()
- concate()
- trim()
JAVA (assignment-2 by MJP ma`am)
- What is synchronization.explain with suitable example.
- Explain various form of implementing interface.
- Explain following thread methods
- sleep()
- wait()
- resume()
- notify()
- stop()
- Define Exception . What is the purpose of exception handling mechanism . Explain try and catch block with suitable example.
- Define multi threading . how a new thread is created . Explain the life cycle of thread.
- Write short notes:
- Interthread communication
- Difference: Interface & Class
- Write a program which illustrate the use of NumberFormateException. (SOLUTION)
- Describe the various stages of the life cycle of an Applet.
JAVA (assignment-1 by MJP ma`am)
- Write a Java program to find whether the given number is prime or not.(SOLUTION)
- Explain garbage collection and finalize method.
- Explain shift operator with example.
- How the super class constructor is invoked with example .
- Explain method overriding with suitable example.
- Explain abstract class.
- What is package? explain how to create package.
IAP -Inheritance (assignment-2 by RRP ma`am)(mid sem)
- What is inheritance? Explain the types of inheritance.
- Write down the difference between structure and class.
- Explain virtual method with suitable example.
- Explain hiding method with suitable example.
- Explain the abstract classes and function.
- Explain sealed classes and methods.
- What is modifiers? Explain visibility modifiers and other modifiers.
IAP -.net (assignment-1 RRP ma`am)(mid sem exam)
- Draw the architecture of .net framework and explain it.
- Explain CLR activities and flow chart of it.
- Explain CTS and CLS.
- Explain managed code and unmanaged code.
- Write down the benefits of .net technology.
- Explain Namespace.
- Explain assemblies and differentiate private assemblies and shared assemblies.
COMPUTER NETWORKS(practical 1)
- What is computer networks and define the term also write down the various application.
- Briefly explain computer criteria.
- What is protocol list and explain the element of protocol.
- List and explain types pf line configuration.
- Give full name of following terms
- ISO
- ANSI
- IEEE
- IETF
- MAN
- WAN
- LAN
- ISP
- ARPA
- List and explain mode of communication with example.
- List and explain the types of networks in brief.
COMPUTER NETWORKS(practical 2)
- Write a short note on twisted pair cable?
- List the different types pf guided media. Explain the applications and types of coaxial cable.
- Write advantages of fiber optics over the twisted pair also explain the principle of fiber optics.
COMPUTER NETWORKS(practical 3)
- List the different categories of devices based on OSI layer.
- What is role of repeater in computer network also explain the difference between repeater and amplifier.
- What is hub?explain types of hub. Explain its working with appropriate block diagram.
- Switch is working on which layer of OSI model . Explain its functionality compare to bridge and hub.
- What is network adapter?
- Explain the role of router in context of other networking devices.
COMPUTER NETWORKS(practical 6)
- What is network security?why it is require?
- What are the reason for weak security?
- List and explain different types of attack.
- Define Firewall also explain types of firewall in brief.
- What is cryptography ? List the types of cryptography .
- Explain symmetric and Asymmetric cryptography with diagram.
COMPUTER NETWORKS(practical 5)
- What is topology? Explain in brief. List types of topology.
- Explain bus topology also write advantages and disadvantages.
- Draw the star topology explain the advantages over the bus topology also write the disadvantages of star topology.
- Explain ring topology.
- Explain the structure of mesh topology over the star and bus topology .explain advantages and disadvantages.
- List the different type of server. Explain application of each in brief.
COMPUTER NETWORKS(Practical 4)
- Write a short note on IPV4 addressing scheme.
- What is classful addressing scheme? List and explain the different class in classful addressing.
- In classful addressing scheme how you decide the net id and host id ?
- What is default masking ?
- Why the masking is used?
- What is sub netting?
- What is classless addressing scheme?
- What is IPV6 ? Explain the features of IPV6 also List the difference between IPV4 and IPV6.
- Draw and explain IP headers format .Expalin each and every option.
Subscribe to:
Comments (Atom)