Sunday, 9 March 2014

'C' Code to print Pascal's Triangle

1
1  1
1  2  1
1 3  3  1
1 4  6  4  1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1

main()
{
 int n,i,j;
 printf("Enter the number of rows of pattern to be drawn: ");
 scanf("%d",&n);
 
 for(i=0;i<=n-1;i++)
 {
  for(j=1;j<=n-i-1;j++)
  {
   printf(" ");
  }
  for(j=0;j<=i;j++)
  {
   if(i==j || j==0)
   printf("1 ");
   else
      printf("%d ",f(i,j));
      
  }
  printf("\n");
 }
 
}

f(x,y)
  int x , y;
{
 int z = x - y , fx , fy , fz;
 fx=1;
 while(x!=1)
 {
  fx = fx * x;
  x--;
 }
 fy = 1;
 while(y! = 1)
 {
  fy = fy * y;
  y--;
 }
  fz = 1;
 while(z!=1)
 {
  fz = fz * z;
  z--;
 }
 
 return fx / (fy * fz);
 
} 

Tuesday, 25 February 2014

'C' Code to print "Star Triangle"

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

main()
{
int i,j,r;
printf("Enter the number of rows of stars of Star Triangle to be drawn ");
scanf("%d",&r);
for(i=1;i<=r;i++)
{
 for(j=1;j<=r-i;j++)
 {
  printf(" ");
 }
 for(j=1;j<=2*i-1;j++)
 {
  printf("*");
 }
 printf("\n");
}
}

'C' Code to swap 2 numbers without the use of a third variable




main()
{
int a,b;
printf("Enter the two numbers,namely 'a' and 'b'");
scanf("%d%d",&a,&b);
a = a + b;
b = a - b;
a = a - b;
printf("The swapped number 'a' is %d\n",a);
printf("The swapped number 'b' is %d\n",b);
}

Thursday, 20 February 2014

Full Forms of some Computer Related Abbreviations

Today I found some Computer Related Full Forms,so I am sharing with all you people so that you can get aware of it.


  • HTTP = Hyper Text Transfer Protocol.
  • HTTPS = Hyper Text Transfer Protocol Secure.
  • IP = Internet Protocol.
  • URL = Uniform Resource Locator.
  • USB = Universal Serial Bus.
  • VIRUS = Vital Information Resource Under Seized.
  • 3G = 3rd Generation.
  • GSM = Global System for Mobile Communication.
  • CDMA = Code Divison Multiple Access.
  • UMTS = Universal Mobile Telecommunication System.
  • SIM = Subscriber Identity Module.
  • AVI = Audio Video Interleave
  • RTS = Real Time Streaming
  • SIS = Symbian OS Installer File
  • AMR = Adaptive Multi-Rate Codec
  • JAD = Java Application Descriptor
  • JAR = Java Archive
  • JAD = Java Application Descriptor
  • 3GPP = 3rd Generation Partnership Project
  • 3GP = 3rd Generation Project
  • MP3 = MPEG player lll
  • MP4 = MPEG-4 video file
  • AAC = Advanced Audio Coding
  • GIF = Graphic Inter changeable Format
  • JPEG = Joint Photographic Expert Group
  • BMP = Bitmap
  • SWF = Shock Wave Flash
  • WMV = Windows Media Video
  • WMA = Windows Media Audio
  • WAV = Waveform Audio
  • PNG = Portable Network Graphics
  • DOC = Document (Microsoft Corporation)
  • PDF = Portable Document Format
  • M3G = Mobile 3D Graphics
  • M4A = MPEG-4 Audio File
  • NTH = Nokia Theme (series 40)
  • THM = Themes (Sony Ericsson)
  • MMF = Synthetic Music Mobile Application File
  • NRT = Nokia Ringtone
  • XMF = Extensible Music File
  • WBMP = Wireless Bitmap Image
  • DVX = DivX Video
  • HTML = Hyper Text Markup Language
  • WML = Wireless Markup Language
  • CD = Compact Disk.
  • DVD = Digital Versatile Disk.
  • CRT = Cathode Ray Tube.
  • DAT = Digital Audio Tape.
  • DOS = Disk Operating System.
  • GUI = Graphical User Interface.
  • HTTP = Hyper Text Transfer Protocol.
  • IP = Internet Protocol.
  • ISP = Internet Service Provider.
  • TCP = Transmission Control Protocol.
  • UPS = Uninterruptible Power Supply.
  • HSDPA = High Speed Downlink Packet Access.
  • EDGE = Enhanced Data Rate for GSM [Global System for Mobile Communication] Evolution.
  • VHF = Very High Frequency.
  • UHF = Ultra High Frequency.
  • GPRS = General Packet Radio Service.
  • WAP = Wireless Application Protocol.
  • TCP = Transmission Control Protocol.
  • ARPANET = Advanced Research Project Agency Network.
  • IBM = International Business Machines.
  • HP = Hewlett Packard.
  • AM/FM = Amplitude/ Frequency Modulation.
  • WLAN = Wireless Local Area Network.