Saturday 12 July 2014

important points

1)can we execute a program without installing OS?
- >no,we cannot run any simple program with out OS. But in some cases machine level language can run because   it .directly interacts with the hardware.
2)Buffer-buffer is used to store data temporarily.
3)Stack supports 4 main computing areas, they are
   1)expression evaluation.
   2)subroutine return address storage.
   3)dynamically allocated local variable storage.
   4)subroutine parameter passing.
4)how to reverse a linked list without using any pointer in c?
 ->using stack push all elements in to stack and again insert elements from stack to linked list.
5) void pointer and character pointer are of same size. because the address hold to store these values is of
 same size.
6)data structure-efficient way of organizing data.
   linear data structure-if the data elements form a sequence.
   non-linear data structure-every data item is attached to several other data items in a way that is reflecting relationships.







Data Link layer

useful link for data link layer
click here

Tuesday 8 July 2014

File i/o (java)

import java.io.*;
class File
{
  public static void main(String args[]) throws Exception
  {
     String s="karteek is studying in GIT";
     PrintWriter p=new PrintWriter(new FileWriter("karteek.txt"));
     p.println(s);
     p.close();
     BufferedReader f=new BufferedReader(new FileReader("karteek.txt"));
     String s1=f.readLine();
    System.out.println(s1);
     f.close();
   }
}