compiler design limiting instruction, C/C++ Programming

Assignment Help:
Ravi is a newbie to the programming and while learning the programming language he came to know the following rules:

· Each program must start with ''{'' and end with ''}''.

· Each program must contain only one main function. Main function must start with ''<'' and end with ''>''.

· A program may or may not contain user defined function(s). There is no limitation on the number of user defined functions in the program. User defined function must start with ''('' and end with '')''.

· Loops are allowed only inside the functions (this function can be either main function or user defined function(s)). Every loop must start with ''{'' and end with ''}''.

· User defined function(s) are not allowed to be defined inside main function or other user defined function(s).

· Nested loops are allowed.

· Instructions can be any where inside the program.

· Number of Instructions in any program should not be more than 100.

If any of the above conditions does not met, then the program will generate compilation errors. Today Ravi has written his first program "Hello World", but he is not sure about the correctness of the program now your task is to help him to find out whether his program will compile without any errors or not.

Related Discussions:- compiler design limiting instruction

Data type, what is virtual datatype

what is virtual datatype

Change to palindrome, A palindrome is a string that reads the same from bot...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Symbolic constant, S y m b o li c c o n s t a n t : c ...

S y m b o li c c o n s t a n t : c on s t m a x = 1 0 0 ; T h e d e f a u l t d a t a t y p e w i l l b e i n t e

C++ programming, Write a program to convert English units to metric (e.g., ...

Write a program to convert English units to metric (e.g., miles to kilometers, gallons to liters, etc.). Include a specification and a code design.

Area under curve, find the area of a curve y=f(x) between x=a and x=b integ...

find the area of a curve y=f(x) between x=a and x=b integrate f(x) between limits a and b   #include float start_point, /* GLOBAL VARIABLES */

Produce data from fixed ocr areas scanned, Produce data from fixed OCR area...

Produce data from fixed OCR areas scanned. Project Description: Project is to design software which can use character recognition only on certain areas of scanned puff's/ jpe

How to double to int, char P[100]; double X=533.8*22500; sprintf(P...

char P[100]; double X=533.8*22500; sprintf(P,"%f %u",X,(unsigned int)X); MessageBox(P,"SSS"); //12010500.000 12010499

Described local class? why can it be useful?, It is a class defined in the ...

It is a class defined in the scope of a function _ any function, whether a member functions or a free function. For instance: // Example : Local class // int f() { c

Simple program of c++ , Simple program of c++: int main() {    i...

Simple program of c++: int main() {    int   bushels;    float dollars, rate;                 cout                 cin >> dollars;                 cout

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd