C program to Read From a File

#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); …

Sorted Linked List implementation in C

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) { …

What is a Budget?

What is a Budget? Budget is a plan of income, expenses & other financial operation for a future period. Concept of Costing A person making or producing any thing must not only know how much it costs to make but also to help in determining the selling price.It is necessary that the person not only knows …

Resistors

Resistors:- The component which is having ‘opposing force’ similar in many respects to mechanical friction is called a resistors. The symbol of resistors is, the opposing force of resistors is  called a ‘resistance’. The resistance is measured in ohms. In resistors they are of two groups 1) fixed, 2) variable. 1) Fixed resistors:- The most commonly …