12.27.2013

Character Rectangle Structure

Q. Write  a C program to display the following character rectangle structure/pattern/design as:

ABCDEEDCBA
ABCD__DCBA
ABC____CBA
AB______BA
A________A

Ans.

/*c program for character rectangle pattern*/
#include<stdio.h>
int main()
{
 char ch,r='A',c,sp;
 printf("Enter any character : ");
 scanf("%c",&ch);
 if(ch>='a' && ch<='z')
    ch=ch-32;
 printf("\n");
 for(; ch>='A'; ch--,r++)
 {
  for(c='A'; c<=ch; c++)
     printf("%c",c);
  for(sp=r; sp>'A'; sp--)
     printf("__");
  for(c=ch; c>='A'; c--)
     printf("%c",c);
  printf("\n");
 }
 getch();
 return 0;
}

/*************************************************************
The output of above program would be:
*************************************************************/


Output of character rectangle pattern C program
Figure: Screen shot for character rectangle structure C program


12.10.2013

Number Rectangle Pattern

Q. Write a C program to print the following number pattern rectangle as:

1 2 3 4 5 4 5
2 3 4 5 3 4 5
3 4 5 2 3 4 5
4 5 1 2 3 4 5

Ans.

/*c program for number pattern rectangle design*/
#include<stdio.h>
int main()
{

10.05.2013

Flag Structure Design

Q. Write a C program to print the following flag design as:

 * * * * * * * * *
 * * * *
 * * * *
 * * * *
 * *
 * * * *
 * * * *
 * * * *
 * * * * * * * * *

Ans.

/*c program for flag design*/
#include<stdio.h>
int main()
{

9.26.2013

Calculating Sum of Number of elements

Q. Write a C program to accept the number of elements to be insert from the user and calculate these elements sum.

For example:

if user enter no. of elements : 5
then he/she should enter elements value as:
Enter 1 element/number : 2
Enter 2 element/number : 7
Enter 3 element/number : 1
Enter 4 element/number : 10
Enter 5 element/number : 50
Result will be : 
Sum of elements/numbers : 70

Ans.

/*c program for entered number of elements and calculate the sum*/
#include<stdio.h>
int main()
{
 int num,arr[20],i,sum=0;
 //arr[20] value of changeable as big value

9.22.2013

Star-Zero Nested Pattern

Q. Write a C program to print the following star-zero nested pattern pyramid as:

*000*000*
0*00*00*0
00*0*0*00
000***000

Ans.

How to make above star-zero nested pattern:

*000*000*
0*00*00*0
00*0*0*00
000***000

In above star-zero nested pattern, there are 4 loops(each loop have different color), so before you making above pyramid, you should make first individual each loop, after making all loop, join them.
That's done.

/*c program for star-zero nested pattern pyramid*/
#include<stdio.h>
int main()
{

9.13.2013

Even Number Pattern

Q. Write a C program to print the following even number pattern as:

 2
 2 4
 2 4 6
 2 4 6 8

Ans.

/*c program for even number pattern*/
#include<stdio.h>
int main()
{

9.07.2013

Number Pyramid Structure

Q. Write a C program to print the following number pyramid structure design as:

1 2 3 4 5
2 3 4 5
3 4 5
4 5
5

Ans.

/*c program for number pyramid pattern design*/
#include<stdio.h>
int main()
{

9.06.2013

Positive-Negative Number Triangle

Q. Write a C program to print the following positive-negative number triangle as:

9
8  6
7  5  3
4  2  0 -2
1 -1 -3 -5 -7

Ans.

/*c program for positive-negative number triangle*/
#include<stdio.h>
int main()
{

9.05.2013

Equilateral Triangle Number Design

Q. Write a C program to print the following equilateral triangle number design as:

     5
    454
   34543
  2345432
 123454321

Ans.

/*c program for equilateral triangle design*/
#include<stdio.h>
int main()
{

Z-Shape Pyramid

Q. Write a C program to print the Z-Shape pyramid as:

******
    *
   *
  *
 *
******

Ans.

/*c pyramid program for z-shape*/
#include<stdio.h>
int main()
{

Number Triangle

Q. Write a C program to print the following number triangle as:

     1
    21
   321
  4321
 54321

Ans.

/*c program for number pyramid*/
#include<stdio.h>
int main()
{

9.01.2013

Increased Number Triangle

Q. Write a C program to print the following Increased Number Triangle as:

    5
   45
  345
 2345
12345

Ans.

/*c program for increased number triangle*/
#include<stdio.h>
int main()
{

Decreased Number Triangle

Q. Write a C program for decreased number triangle as:

5
54
543
5432
54321

Ans.

/*c program for decreased number triangle*/
#include<stdio.h>
int main()

Half-Square Number Triangle

Q. Write a C program to print the following half-square number triangle C program as : 

543212345
 4321234
  32123
   212
    1

Ans.

/*c program for half-square number triangle*/
#include<stdio.h>
int main()
{
 int num,r,c,n,sp,p;

Odd-Number Triangle

Q. Write a C program to print the following odd-number triangle C program as:

135
11111
33333
55555

Ans.

/*c program for odd number triangle*/
#include<stdio.h>
int main()
{

V-Shape Pyramid

Q. Write a C program to print the following V symbol star pyramid as:

*     *
 *   *
  * *
   *

Ans.

/*c pyramid program for v-symbol*/
#include<stdio.h>
int main()
{

8.27.2013

Reverse L-Shape Pyramid

Q. Write a C program to print the following Reverse L-Shape pyramid as:

*************
*
*
*
*
*
*
*


Ans.

/*c program for reverse L-shape pyramid*/
#include<stdio.h>
int main()
{
 int c;

C Star Triangle

Q. Write a C program to make the following star triangle as:

*
**
**
**
******

Ans.

/*c program for star triangle design*/
#include<stdio.h>
int main()
{
 int r,c,n;
 printf("*\n");

8.26.2013

Nested Star-Hash Pyramid

Q. Write a C program to print the following star-hash pyramid design:

#####*#####
####*#*####
###*###*###
##*#####*##
#*#######*#
*#########*

/**************************************************************
How To Make Above nested Pyramid C program
***************************************************************
So you can see, there are four types pyramid in above design as:

 #####      *         #####
 ####      *#   *      ####
 ###      *##   #*      ###
 ##      *###   ##*      ##
 #      *####   ###*      #
       *#####   ####* 

Hence, now it is easy to make these above pyramid program. So i recommended to make first above four pyramid program, after making these pyramid design, add these all pyramid in single C program and you are done. :) )
**************************************************************/

Ans.

/*c program for nested star-hash pyramid*/
#include<stdio.h>
int main()
{

8.25.2013

Binary Geometric Number Pyramid

Q. Write a C program to print the following binary geometric number pyramid as:

 1
 2 3
 4 5 6 7
 8 9 10 11 12 13 14 15
 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

or

 7
 14 15
 28 29 30 31
 56 57 58 59 60 61 62 63

[How to create : in above pyramid design, left hand side vertical left align elements are as 1, 2, 3, 4, 8 as geometric sequence numbers. And each these number increase to +1, till equal the binary number as 1, 2, 4, 8, 16 and so on.
]

Ans.

/*c program for generating geometric sequence of any number*/
#include<stdio.h>
int main()
{
 int num,n,r,c,rows,x=1;

8.23.2013

Number Triangle Design

Q. Write a C program to print the following number triangle or pyramid design as:

1
121
12321
1234321

Ans.

/*c program for number triangle design*/
#include<stdio.h>
int main()
{
 int num,r,c,z;
 printf("Enter any number : ");
 scanf("%d", &num);

Alternate Number-Star Pyramid

Q. Write a C program to print the following alternate number-star pyramid/triangle as:

1
2*2
3*3*3
4*4*4*4
4*4*4*4
3*3*3
2*2
1

Ans.

/*c program for alternate number-star pyramid*/
#include<stdio.h>
int main()
{
 int num,r,c,z=1,p,n;
 printf("Enter maximum number : ");
 scanf("%d", &num);

Number Triangle Design

Q. Write a C program to design the number triangle pyramid as:

1
121
1231
12341
123451

Ans.

/*c program for number triangle design*/
#include<stdio.h>
int main()
{
 int num,r,c,z;
 printf("Enter No. of rows : ");
 scanf("%d", &num);

Diagonal Star and Zero Rectangle

Q. Write a C program to print the following diagonal star and zero rectangle structure as:

*000000
0*00000
00*0000
000*000
0000*00
00000*0
000000*

Ans.

/*c program for diagonal star and zero rectangle*/
#include<stdio.h>
int main()
{
 int rows=7,r,c;

Vertical Continues Number Pyramid

Q. Write a C program to print the following vertical continues number pyramid as:

 1

 23
 4
 56
 7
 89
 10

Ans.

/*c program for vertical continues number pyramid*/
#include<stdio.h>
int main()
{
 int r,c,x,y;

7.10.2013

Computer Terms Full Forms


General Computer Short Term and related full form terminology as:

Short Term Full Form
ABC Atanasoff-Berry Computer
AMD Advanced Micro Devices
AI Artificial Intelligence
ALU Arithmetic and Logic Unit
ANSI American National Standards Institute
ASCII American Standard Code for Information Interchange
ATM Automated teller machine or Asynchronous Transfer Mode
AVI Audio Visual Interleave
BIOS Basic Input Output System
CD Compact Disk
CU Control Unit
CRT Cathode Ray Tube
CGI Common Gatweay Interface
CRC Cyclic Redundancy Check
CPU Central Processing Unit
CAD Computer Aided Design
CUI Character User Interface
CAI Computer Aided Instruction
CAL Computer Aided Learning
CAM Computer Aided Manufacturing
CSMA/CD Carrier Sense Multiple Access / Collision Detection
CVT constant voltage transformer!
DARPA Defense Advanced Research Projects Agency
DHCP Dynamic Host Configuration Protocol
DIMM Dual In-line Memory Module
DMA Dynamic Memory Access
DPI Dot Per Inch
DVD Digital Versatile Disc or Digital Video Disc
EDI Electronic Data Interchange
EDO-RAM extended data output-RAM
FAT File Allocation Table
FLOPS Floating Point Instruction Per Second
FAX Far Away Xerox
FDC Floppy Disk Controller
GIGO Garbage In Garbage Out
GUI Griphical User Interface
GPL General Public Language
HD Hyper Definiation
HDD Hard Disk Drive
HDC Hard Disk Controller
IDE Integrated Development Environment
IRC Internet Relay Chat
IEEE Institute of Electrical and Electronics Engineers
IETF Internet Engineering Task Force
IGMP Internet Group Management Protocol
ISDN Integrated Service Digital Network
LASER Light Amplification by Stimulated Emission of Radiation
LCD Liquid Crystal Display
LED Light Emitting Diode
MICR Magnetic Ink Character Recognition
MIDI Musical Instrument Digital Interface
NASSCOM National Association of Software and Services Companies
NFS Network File System
NTFS New Technology File System
OCR Optical Character Recognition
OLE Object Linking and Embedding
OOP Object Oriented Programming
OMR Optical Mark Recognition
PATA Parallel advanced technology attachment
P-COMMERCE Pipe-Commerce
PDF Portable Document Format
PRM Rotate Per Minute
QOS Quality Of Service
RAID Redundant Array of Independent Disks or Redundant Array of Inexpensive Disks
RAM RAndom Access Memory
ROM Read Only Memory
RJ Registered Jack
RTF Rich Text Format
SATA Serial Advanced Technology Attachment
S-D-RAM Synchronous dynamic random access memory
SIMM single in-line memory module
SMPS Switching-Mode Power Supply
UNIAC UNIVersal Automatic Computer
UPS Un-interruptable Power Supply
USB Universal Serial Bus
UUCP Unix-to-Unix Copy Protocol
VGA Video Graphics Array
VSAT Very Small Aperture Terminal
WAIS Wide Area Information System
WAV Waveform Audio
WI-FI Wireless Fidelity
WMF Windows Metafile Format
WORM Write Once Read More
WYSIWYG what you see is what you get
ZIP Zigzag Inline Package or zicxac inline pin


Repeaters

Repeaters are also called Re-generator.

Repeaters is only hardware device.

Repeaters re-generate the original bit pattern.


Repeaters in Computer Network to re-generate to weak signal
Figure: Repeaters in Computer Network

The purpose of repeater is to extend the LAN segment beyond its physical limits.

7.09.2013

Open System Interconnection (OSI) Model

Question: What is OSI model? Elaborate your answer.

Answer:  

The OSI stand for "Open System Interconnection".

It was first introduced in the late 1970s by the ISO (International Standard Organization).

An OSI is a set of protocol that allow any two different system to communicate regardless of their underlying architecture.

The OSI model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust, and inter-operable.

It consists of seven separate but related layers, each of which defines a part of the process of moving information across network.

These seven layers of OSI model can be divided into two categories:

Gateway

Q. What is Gateway?

Answer:

A gateway is hardware & software devices

Gateway is used to interconnect LAN & WAN.

Gateway in Networking
Figure: Gateway in Networking

Gateway makes communication possible between different architecture & environment.

Gateway perform protocol and date onversion.

A gateway operate at the "Transport Layer" and above.

Routers

Question: What is routers?

Answer:

A router is a special purpose computer, that allows to connect to multiple computer networks.

Routers are both hardware & software devices.


Routers in computer networking
Figure: Routers in computer networking

Router can connect network segments, and filters and isolate traffic.

Bridge

A bridge segment or divide a network to isolate traffic related problem.

A bridge sends the data frames only to the concerned segment.

Bridges are used to connect dis-similar network like ethernet system to Token Ring-System. Thus bridge used to join network using CSMA/CD access and token passing access.

Bridge in Networking
Figure: Bridge in Networking 

Bridge are both hardware and software devices.

7.08.2013

Hub

Hubs are also called "Multi port repeaters" or "concentrators".

Hub is hardware devices.


Hubs in Computer Networking
Figure: Hubs in computer networking

Hub is similar to repeaters, except that it broadcast data received by any port to tall other parts on the hub.

Random Number Pyramid

Q. Write a C program to print the any entered number, digit pyramid,

For example:

if entered number is : 87954
then output must be as:

87954
7954
954
54
4

Ans.

/*c program for random digit pyramid*/
#include<stdio.h>
int main()
{
 int n[50],i,j=0,k,r,c,len;
 printf("Enter total length of number : ");
 scanf("%d", &len);
 printf("\nNote: Entered digit MUST be single.\n\n");
 for(i=0; i<len; i++)
 {

7.03.2013

Diamond Pattern C program

Q. Write a C program to print the following diamond pattern as:

4
434
43234
4321234
43234
434
4

Ans.

/*c program for diamond pattern*/
#include<stdio.h>
int main()
{
 int num,r,c,z,n,nm,no;
 printf("Enter max. number : ");
 scanf("%d", &num);
 nm = num+1;
 for(r=1; r<=num; r++,nm--)
 {
  for(c=1,n=num; c<=r; c++,n--)
     printf("%d",n);
  for(z=nm,c=1; c<r; c++,z++)
     printf("%d",z);
  printf("\n");
 }