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
Ask queCreate an object oriented application with C# that computes the area of a rectangle, and the area and the volume of a cuboid. Based on the inheritance concept, create a bas

pseudocode for gregorian calendar

Introduction to I/O interfacing, discuss microcontrollers applications in industry. Detailed product design specifications that have sections on both hardware and software inclu

Define Four Facilities Provided by C Language Preprocessor? The C language preprocessor provides four separate facilities that you can use as you see fit:   Inclusion

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. The area under a curve betw   Solution:

Train Station C++ Program A C++ program that provides a simple text based interface that will allow a user to create, edit, search, or delete a train schedule. The program will m

write a program to calculate the cuboid

Hello, Do you have any idea for programming project to simulate a network attack (threat) mechanism or a defense mechanism. Can I get some suggestions for this. Please include th


What is Union? Intimately associated with the structure is the union which as well contains multiple members. Unlike a structure but the members of a union share the same stora