123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Program to Identify Tokens In A Given Line viz. Identifier, Literal, Alphabet, Special Symbol(_,-) e

--------------------------------------------------------------------------------

Description : This program is used to identify the tokens in a given string.

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
#define COLOR1 {textcolor(6); textbackground(1);}
#define COLOR2 {textcolor(5); textbackground(15);}
#define COLOR3 textcolor(6);
#define COLOR4 textcolor(9);

void main()
{
char book[100];
char grid[10][30];
int k = 0;
int row = 0;
int col = 0;
int i = 0;
int clock = 0;
int j = 0;
int shiva = 0;

clrscr();

cout<<"Enter a string : ";
gets(book);

k = strlen(book);

book[k] = 32;
book[k+1] = '#';

for(i=0;book[i]!='#';i++)
{
while(book[i]!=32)
{
grid[row][col] = book[i];
col++;
i++;
}
grid[row][col++] = '

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG