June 21, 2015

C program to Read From a File

#include <stdio.h>
#include <stdlib.h>
void main()
{
    FILE *fptr;
    char filename[15];
    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);
    }
    fclose(fptr);
}

C Program to create and write a File

#include<stdio.h>
#include<conio.h>

int main()
{
FILE *fp;
char ch;
fp = fopen("one.txt", "w");
printf("Enter data");
while( (ch = getchar()) != EOF) {
    putc(ch,fp);
}
fclose(fp);

return 0;
}

Programming Manual

 

Star Formations http://cs-study.blogspot.com/2013/10/c-program-to-print-different-star.html
Hollow Square http://cs-study.blogspot.com/2013/10/c-program-to-print-hollow-stars-square.html
Ascending Order without loops http://cs-study.blogspot.com/2013/10/c-program-to-display-integers-in.html 
Phases of a Program  http://cs-study.blogspot.com/2013/09/c-program-phases-writing-and-executing.html
Dev C++ Installation  http://cs-study.blogspot.com/2013/09/installation-of-dev-c.html
Programming Introduction  http://cs-study.blogspot.com/2013/09/introduction-to-programming.html
Bubble Sort  http://cs-study.blogspot.com/2012/12/bubble-sort.html
Binary Search  http://cs-study.blogspot.com/2012/12/binary-search.html
Arrays  http://cs-study.blogspot.com/2012/10/arrays.html

May 31, 2015

Networking Terminologies

Please write a brief note on all the terminologies. A quiz will be taken on the following in the upcoming class.


Unshielded Twisted Pair Cables (UTP).
T568-A color Schemes for Straight Through, Cross Over, Roll Over Cables.
T568-B color Schemes for Straight Through, Cross Over, Roll Over Cables.

Network congestion
TCP congestion-avoidance
         
Additive increase/multiplicative decrease
Slow-start
Fast Retransmit and Fast Recovery

FireWall and VPNs
IP Tunnel
Asynchronous Transfer Mode (ATM):-
             Try to cover all the terminologies used in the following tutorial. ATM Tutorial     
    
NS2

Simulator class in NS2
Networking Nodes in NS2 and their features
Types of links available for us to use in NS2
Bandwidth
Latency Time
Queueing Algorithms
TCP
UDP
CBR
FTP
TCP Sink Agent
NULL Agent

.........................
Paper Pattern:

Q1. Theoretical Portion as defined above. Prepare comprehensively.
Q2. NS2 complete. Prepare thoroughly. You will have to write code.
Q3. Do prepare thoroughly for RiverBed. You will have to perform task on riverbed. Following tasks are excluded.

A Shared media network
A direct link network
Small office network



C program to Read From a File

#include <stdio.h> #include <stdlib.h> void main() {     FILE *fptr;     char filename[15];     char ch;   ...