473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

token check

Hi I'm new in this forum and I need help in this program
I have to write a program in C language which reads 2 files. The first file contains any C code and the other file contains the reserved word in C. The program reads from first file and compare the word read with the reserved words in the other file. If there is a match print the word.
Any help!!
Thanks
Apr 15 '07 #1
1 1987
Savage
1,764 Expert 1GB
Hi I'm new in this forum and I need help in this program
I have to write a program in C language which reads 2 files. The first file contains any C code and the other file contains the reserved word in C. The program reads from first file and compare the word read with the reserved words in the other file. If there is a match print the word.
Any help!!
Thanks
Hi,

well what we need is to build up 2 arrays.In first one ,which will have 1D, we will
read a word from the first file and secound will be a also 1D array because we need to read all reserved words.After that it's simple:U need to create a loop which will loop like:

Expand|Select|Wrap|Line Numbers
  1. for(i=0;i<=numberOfElementsInSecoundArray;i++)
  2. {
  3.     if(strcmp(wordFromFirstFile,reserwedWords[i])==0) print it out
  4.  
  5. }
Apr 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jim Harris | last post by:
Somewhere I read about authenticating against a file token on the user's hard drive - but I can't find the book I read it in anymore. If you know what I'm talking about please let me know. ...
14
by: Simon Morgan | last post by:
I'm trying to write a function to parse a Reverse Polish Notation string from stdin and return 1 token at a time. For those of you who are unaware an RPN string looks like this: 1 2 + 4 * 3 + ...
0
by: Juan Irigoyen | last post by:
By example Client token = new UsernameToken("juan", "1111", PasswordOption.TextPlain ); Server protected override string AuthenticateToken( UsernameToken token ) {
1
by: CodeRazor | last post by:
Hi, How can you retrieve a session token? or is a session token something that you set yourself? How can you check for the existance of a session token? Is a session token the same thing as...
10
by: Ian Lazarus | last post by:
Hello. How do "unresolved token" link errors occur. How do I fix them? Linking... LINK : error LNK2020: unresolved token (0A000015) ??_7type_info@@6B@ LINK : error LNK2020: unresolved token...
0
by: Jay C. | last post by:
Jay 3 Jan. 11:38 Optionen anzeigen Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements Von: "Jay" <p.brunm...@nusurf.at> - Nachrichten dieses Autors suchen Datum: 3 Jan...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
12
by: Joriveek | last post by:
Hi, I have a little piece of program here Basically what it does is, it copies the strings of variable widths. The basis is until it finds a comma ",". The input is a CSV/Comma Separated...
2
by: tllee | last post by:
I wrote a simple stack program using class template on VC++ 2003 but am unable to resolve the following link errors: LINK : error LNK2020: unresolved token (0A000046) Stack.__dtor LINK : error...
1
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, has anyone come across this error before: This is an unexpected token. The expected token is 'NAME' I am getting it when trying to send an xml file across a web service layer. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.