Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C program that does the following lexical analysis Takes in a file, stores into a char array (char textArray[1024]) and conducts the following lexical analysis:

C program that does the following lexical analysis Takes in a file, stores into a char array (char textArray[1024]) and conducts the following lexical analysis:

if the word is all lowercase, print it belongs to category 1.

if the first letter is capitalized but the rest is lowercase, print it belongs to category 2.

if it's just numbers, print it belongs to category 3.

if its 'punctuation', print it belongs to category 4.

if its a cumulation of all of the above, print it belongs to category 5

ex: void main() { printf(" Twenty =%d", 19 + 1); }

void is category 1

main() is category 5

{ is category 4

printf(" is category 5

Twenty is category 2

=%d", is category 5

19 is category 3

+ is category 4

1); is category 5

} is category 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+3. What resources will these tactics require?

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago