Preview

Linux

Good Essays
Open Document
Open Document
1166 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Linux
TERM PAPER
Of
FOUNDATION OF COMPUTING
Topic: - TELEPHONE DIRECTORY

Submitted To: - Submitted By:- MOHIT JAIN MR.VIJAY KUMAR

SOURCE CODE
//TETEPHONR DIRECTORY.

#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<alloc.h>
#include<string.h>
#include<graphics.h>
struct entry
{
char name[50]; char nick[50]; char email[50]; char address[50]; char city[50]; char cont[50]; char pin[50]; struct entry *lptr; struct entry *rptr;
}*temp,*newe,*l,*r;
typedef struct entry *list; void newentry(); void display(char n[50]); void deletentry(char n[50]); void displayall(); void makempty(); int isempty(); void saventry(); void loadentry(); void deleteall(); void newentry()
{
char a[50],b[50],f[50],g[50],c[50],d[50],e[50]; int i,k=0; printf("Enter the Datas for the New Entry:"); printf("Name :"); scanf("%s",a); printf("Nick name :"); scanf("%s",b); printf("E-mail ID :"); scanf("%s",c); printf("Address :"); scanf("%s",d); printf("City :"); scanf("%s",e); printf("Contact No:"); scanf("%s",f); printf("Pincode :"); scanf("%s",g); newe=(struct entry*)malloc(sizeof(struct entry)); for(i=0;i<50;i++) { newe->name[i]=' '; newe->nick[i]=' '; newe->email[i]=' '; newe->address[i]=' '; newe->city[i]=' '; newe->cont[i]=' '; newe->pin[i]=' ';
}
for(i=0;i<50;i++)
{
newe->name[i]=a[i]; newe->nick[i]=b[i]; newe->email[i]=c[i]; newe->address[i]=d[i]; newe->city[i]=e[i]; newe->cont[i]=f[i]; newe->pin[i]=g[i];
}
if(isempty())
{
newe->lptr=newe->rptr=NULL; l=r=newe; printf("Your Entry is Added");
}
else { temp=l; while(temp!=NULL) { i=stricmp(newe->name,temp->name); if(i<0) break; else if(i>0) temp=temp->rptr; else if(i==0) { printf("Name Already Exists.Entry cannot be Added");

You May Also Find These Documents Helpful

  • Good Essays

    PRG/420 Week 3

    • 1025 Words
    • 5 Pages

    ; lastName = keyboard.nextLine(); // Insert a blank line System.out.println(); // Display user information System.out.println("Hello, " + firstName + " " + lastName + ".") ; System.out.println("Your annual salary is $50,000 and your commission " + "rate is 5%."); System.out.println("If this is not correct, please contact your HR " + "Representative.");…

    • 1025 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    CEIS100 W5 ILab Report

    • 320 Words
    • 2 Pages

    Code—copy and paste (or type) your code below. You can also post a screenshot of the program working if you would like.…

    • 320 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    = endbck) stbck = NULL; else stbck = stbck->nxt; delete np;…

    • 401 Words
    • 2 Pages
    Better Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    Write a program to put the biggest one in CX and also display it. Page: 97…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    AIS CHAPTERS

    • 371 Words
    • 10 Pages

    2. To reorganize the data in part 1 into second normal form, it is necessary to split the file in…

    • 371 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    linux

    • 456 Words
    • 2 Pages

    1. What change is necessary to make sendmail listen to all network traffic on port 25? What file would you edit?…

    • 456 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    In the following example, the second line of the table specifies that tax due on a salary of $2000.00 is $225.00 plus 16% of excess salary over $1500.00 (that is, 16% of $500.00). Therefore, the total tax is $225.00 + $80.00, or $305.00.…

    • 669 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Linux Hw

    • 287 Words
    • 2 Pages

    What kind of server repond to recursive queries ? how does this server work ?…

    • 287 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    All data-input and data-display operations (cin and cout) should be done in the function main() test program.…

    • 477 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    548 Heartbeats 1

    • 23633 Words
    • 271 Pages

    stream xmTYo0 2hvzbtuXvQz_q/ 8Bxh/3OXqRG0OlBWeK5zAI0O0RR@3FZ9bKA8sIeEthou8)a-K1(oyr/,kF-iqQFu(NG7lYWOk i9-H7Kg, T7YajZ1)0i V GC cj nweXa(DV44saTO M/g0 e5U h YQW,I,3m.8185j. _nl,3/ 5brvxvGOpGce xiQfNiBSwuj 1KqP(fjz endstream endobj 20 0 obj /Type /Page…

    • 23633 Words
    • 271 Pages
    Satisfactory Essays
  • Good Essays

    Intro to programming

    • 534 Words
    • 3 Pages

    Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height.…

    • 534 Words
    • 3 Pages
    Good Essays
  • Best Essays

    Affordable Health Reforms Act

    • 433125 Words
    • 1733 Pages

    VerDate 0ct 09 2002 14:17 Jun 09, 2010 Jkt 000000 PO 00000 Frm 00001 Fmt 6012 Sfmt 6012 F:\P11\NHI\COMP\PPACFRN.001 HOLCPC…

    • 433125 Words
    • 1733 Pages
    Best Essays
  • Good Essays

    Lab_6_solution

    • 1259 Words
    • 3 Pages

    By the end of this lab session, you will be able to - declare an integer and character array - assign values to array during compilation and during execution - print contents of an array using repetition structure SAMPLE PROGRAM 1 /1. A program reads a series of numbers and print it reversed / include stdio.h void main (void) int i, Num, numbers10 printf(You may enter up to 10 integersn) printf(How many integers would you like to enter ) scanf (d, Num) if (Num 10) Num 10 printf(nEnter your numbers ) for (i 0 i Num i) scanf(d, numbersi) printf(nYour numbers reversed are ) for (i Num - 1 i 0 --i) printf(d , numbersi) printf(nn) SAMPLE PROGRAM 2 /2. Program that demonstrates the use of for loop to accept 8 numbers from user and displays certain numbers from the array / includestdio.h void main() int num, numbers8 printf(You need to enter 8 numbers ... n) for(num 0 num 7 num) scanf(i,numbersnum) printf(nn) printf(Your 1st element is dn,numbers0) printf(Your 2nd element is dn,numbers1) printf(Your 3rd element is dn,numbers2) printf(Your 8th element is dn,numbers7) printf(nn) printf(nnAll together your numbers aren) for(num 0 num 7 num) printf(d ,numbersnum) printf(nn) SAMPLE PROGRAM 3 /3. Program declares an array called charArray and assigns a single character to each of the array element using the initialize braces. Finally, the program prints the content of the array. / includestdio.h void main() char charArray8 F,r,i,e,n,d,s int i for(i 0 i 7 i) printf(charArrayd has a value of cn,i, charArrayi) printf(nMy favourite comedy sitcom is snn, charArray) SAMPLE PROGRAM 4 /4. Program consists of arrays (i.e. integer array and character array). It uses loops to sort the integer array elements in ascending and descending order. Then it displays the contents of the array elements respectively. / includestdio.h void main(void) int array10 0,1,2,3,4,5,6,7,8,9, i char string20 This is a string for(i…

    • 1259 Words
    • 3 Pages
    Good Essays
  • Good Essays

    ubuntu

    • 634 Words
    • 3 Pages

    Ubuntu (/ʊˈbʊntuː/ uu-buun-too) is a Debian-based Linux operating system, with Unity as its default desktop environment. It is based on free software and named after the Southern African philosophy of ubuntu (literally, "human-ness"), which often is translated as "humanity towards others" or "the belief in a universal bond of sharing that connects all humanity".…

    • 634 Words
    • 3 Pages
    Good Essays
  • Better Essays

    This certificate is to certify that ________of class ____ has successfully completed the Investigatory Project entitled for the subject Computer Science as prescribed by Central Board of Secondary Education (CBSE) for the year 2014-15.…

    • 989 Words
    • 10 Pages
    Better Essays

Related Topics