×
The best revenge is massive SUCCESS
--Your friends at LectureNotes

# Note for COMPUTER NETWORKS - CN by Sankalp Gupta

• COMPUTER NETWORKS - CN
• Note
• GTU - GECP
• Computer Science Engineering
• B.Tech
• 919 Views
• Uploaded 1 year ago
Sankalp Gupta
0 User(s)

#### Text from page-2

#include<stdio.h> #include<conio.h> void main() { clrscr(); printf("Name :-- HEMANT TRIVEDI\n"); printf("Door No :-- 103, Street :-- Aradhna \n"); printf("City :-- Bhavnagar , Pin Code :-- 364001"); getch(); } Output:-Name :-- HEMANT TRIVEDI | Door No:-- 103 Street:- Aradhna City:-- Bhavnagar, Pin Code:-- 364001 1.2 Modify the above program to provide border lines to the address. Algorithm: Algorithm to provide border lines to address. Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 : : : : : : : Display ------------------------------------------------- line and Go to new line. Display ------------------------------------------------- line and Go to new line. Display ||, your Name, || and Go to new line. Display ||, your Door No and Street, || and Go to new line. Display ||, your City, Pin Code, || and Go to new line. Display ------------------------------------------------- line and Go to new line. Display ------------------------------------------------- line. Flowchart :START Display -----------& go to new line Display -----------& go to new line A

#### Text from page-3

A Display ||, your Name, || & go to new line Display ||, your Door No and Street, || & go to new line Display ||, your City and Pin Code, || and go to new line Display -----------& go to new line Display ------------ END Program:// Write a program that will print your mailing //address in the following form: //----------------------------------------//----------------------------------------//|| First line : Name || //|| Second line : Door No, Strret|| //|| Third line : City, Pin Code || //----------------------------------------//----------------------------------------//Date : 11/03/2013 #include<stdio.h> #include<conio.h> void main() { clrscr();

#### Text from page-4

printf(" -----------------------------------------------\n"); printf(" -----------------------------------------------\n"); printf("|| Name :-- HEMANT TRIVEDI ||\n"); printf("|| Door No :-- 103 , Street :-- Aradhana ||\n"); printf("|| City :-- Bhavnagar , Pin Code :-- 364001 ||\n"); printf(" -----------------------------------------------\n"); printf(" -----------------------------------------------\n"); getch(); } Output:----------------------------------------------------------------------------------------------------|| Name :-- HEMANT TRIVEDI || || Door No:-- 103, Street:- Aradhana || ||City:-- Bhavnagar, Pin Code:-- 364001 || ----------------------------------------------------------------------------------------------------1.3 Write a program using one print statement to print the pattern of asterisks as shown below : * * * * * * * * * * Algorithm: Algorithm to print the pattern of pattern of asterisks. Step 1: Display * and go to new line Step 2: Display * * and go to new line. Step 3: Display * * * and go to new line. Step 4: Display * * * * Flowchart:START Display * & Go to new line Display * * & go to new line Display * * * & go to new line Display * * * * Program :- END