Compiler Design - Limit the Method Instructions, C/C++ Programming

Raj 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 anywhere inside the program.

· Number of instructions inside any user defined function must not be more than 100.



If any of the above conditions is not satisfied, then the program will generate compilation errors. Today Raj has written a few programs, but he is not sure about the correctness of the programs. Your task is to help him to find out whether his program will compile without any errors or not.
Posted Date: 8/3/2015 5:56:19 AM | Location : USA







Related Discussions:- Compiler Design - Limit the Method Instructions, Assignment Help, Ask Question on Compiler Design - Limit the Method Instructions, Get Answer, Expert's Help, Compiler Design - Limit the Method Instructions Discussions

Write discussion on Compiler Design - Limit the Method Instructions
Your posts are moderated
Related Questions
What are the benefits of using friend classes? - Friend classes are useful when a class wants to hide features from users which are required only by another, tightly coupled cl

Pointers are just numbers, representing addresses in memory. You can add to and subtract from pointers, for instance. It is pretty easy to make mistakes with pointer math, however,

Conversion between Objects of Different Classes As the compiler does not know anything about the user-defined type, the conversion instructions are to be specified in a functio

Write a program that finds the minimum total number of shelv, C/C++ Programming

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Member Functions of a Class A member function of the class is similar as an ordinary function. Its declaration in a class template must explain its return value as well as the


For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t

What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than a

Public, Private and Protected members: Class members can either be declared in public','protected' or in the 'private' sections of the class. But as one of the features of OOP i