Posts

Showing posts from December, 2017

Queue Program in C using an Array and Link List

/*  * C Program to Implement a Queue using an Array  */ #include <stdio.h> #define MAX 5 int queue_array[MAX]; int rear = - 1; int front = - 1; void insert(); void delete(); void display(); void main() { int choice; while (1) { printf("1.Insert element to queue \n"); printf("2.Delete element from queue \n"); printf("3.Display all elements of queue \n"); printf("4.Quit \n"); printf("Enter your choice : "); scanf("%d", &choice); switch (choice) { case 1: insert(); break; case 2: delete(); break; case 3: display(); break; case 4: exit(1); default: printf("Wrong choice \n"); } /*End of switch*/ } /*End of while*/ } /*End of main()*/ void insert() { int add_item; if (rear == MAX - 1) printf("Queue Overflow \n"); else { if (front == - 1) /*If queue is initially empty */ front = 0...

Stack Program in C using Array and Link List

/*  * C Program to Implement a Stack using Array  */ #include<stdio.h> #include<conio.h> int stack[100], choice, n, top, x, i; void push(); void pop(); void display(); void main() {     //clrscr();     top=-1;     printf("\n Enter the size of STACK[MAX=100]:");     scanf("%d",&n);     do     { printf("\n\t STACK OPERATIONS USING ARRAY"); printf("\n\t--------------------------------"); printf("\n\t 1.PUSH\n\t 2.POP\n\t 3.DISPLAY\n\t 4.EXIT"); printf("\n Enter the Choice:"); scanf("%d",&choice); switch(choice) { case 1:     push();     break; case 2:     pop();     break; case 3:     display();     break; case 4:     printf("\n\t EXIT POINT ");     break; default:     printf ("\n\t Please Enter a Valid Choice(1/2/3/4)"); getch();...

Pointer and Its Key Points

WHAT IS POINTER? A pointer in C language is a variable that stores/points the address of another variable. A Pointer in C is used to allocate memory dynamically i.e. at run time. The pointer variable might be belonging to any of the data type such as int, float, char, double, short etc. Pointer Syntax : data_type *var_name;   Example : int *p;  char *p; Where, * is used to denote that “p” is pointer variable and not a normal variable. KEY POINTS TO REMEMBER ABOUT POINTERS IN C: Normal variable stores the value whereas pointer variable stores the address of the variable. The content of the C pointer always be a whole number i.e. address. Always C pointer is initialized to null, i.e. int *p = null. The value of null pointer is 0. & symbol is used to get the address of the variable. * symbol is used to get the value of the variable that the pointer is pointing to. If a pointer in C is ...

Hostory and Features of Java

Image
What is Java? Java is an object-oriented programming language. Java is a fast, secure and reliable language used for many games, devices and applications. James Gosling ,  Mike Sheridan , and  Patrick Naughton  initiated the Java language project in June 1991. The small team of sun engineers called  Green Team . In 1995, Oak was renamed as  "Java"  because it was already a trademark by Oak Technologies. There are many java versions that has been released. Current stable release of Java is Java SE 8. JDK Alpha and Beta (1995) JDK 1.0 (23rd Jan, 1996) JDK 1.1 (19th Feb, 1997) J2SE 1.2 (8th Dec, 1998) J2SE 1.3 (8th May, 2000) J2SE 1.4 (6th Feb, 2002) J2SE 5.0 (30th Sep, 2004) Java SE 6 (11th Dec, 2006) Java SE 7 (28th July, 2011) Java SE 8 (18th March, 2014) Features of Java There is given many features of java. They are also known as java buzzwords. The Java Features given below are simple and easy to understand. Simp...

B.Sc. (C.S.) Semester 2 Data Structure Paper March/April 2017

Image

B.Sc. (C.S.) Semester 2 Computer Syllebus

Image

B.Sc. (C.S.) Semester 4 Computer Syllabus

Image