Category: Computer Articles
Data structures help us to organize the data in the computer, resulting in more efficient programs. An efficient program executes faster and helps minimize the usage of resources like memory, disk. Computers are getting more powerful with the passage of time with the increase in CPU speed, availability of faster network and the maximization of disk …
Arrays are data structure in which identical data types are stored. The arrays occupy the memory depending upon their size and have contiguous area of memory. We can access the arrays using the array index. To declare arrays, we have to give their data type, name and size. These are fixed-size arrays. The declaration of arrays is as follows: data_type …
All networks are made up of basic hardware building blocks to interconnect network nodes, such as Network Interface Cards (NICs), Bridges, Hubs, Switches, and Routers etc. These devices also need cables to connect them. In this tutorial, we are going to discuss these important devices. Network interface cards A NIC (network interface card) is …
In order for the communication to take place, cables play important role. Cable is the medium through which information usually moves from one network device to another. There are several types of cable which are commonly used with LANs. The type of cable chosen for a network is related to the network’s topology, protocol, and size. …
#include #include void main() { FILE *fptr; char filename; char ch; printf(“Enter the filename to be opened n”); scanf(“%s”, filename); /* open the file for reading */ fptr = fopen(filename, “r”); if (fptr == NULL) { printf(“Cannot open file n”); exit(0); } ch = fgetc(fptr); while (ch != EOF) { printf (“%c”, ch); ch = fgetc(fptr); …
#include "stdio.h" #include "conio.h" #define size 5 int stack = {0}; int top = -1; void push(int value) { if(top < size) { top++; stack = value; } else { printf("Stack overflow n"); } } void pop() { if(top >= 0) { printf("The popped element is:t %d n", stack); stack = 0; top--; } else { …
include “stdio.h” include “stdlib.h” include “conio.h” void del(int data); void insert(int value); void display(); struct node { int data; struct node *link; }; struct node *top=NULL,*temp, *temp1, *temp2, *temp3; int main() { int choice,data; while(1) //infinite loop is used to insert/delete infinite number of elements in linked list { printf(“n1.Insertn2.Deleten3.Displayn4.Exitn”); printf(“nEnter ur choice:”); scanf(“%d”,&choice); switch(choice) { …