Answer Posted / som shekhar
Take the following example where i assume that table size
has been defined previosly but at some part of time i want
to change it..but the table size is defined in some other
module and you dont have an access to it.
#if TABLE_SIZE>200
#undef TABLE_SIZE
#define TABLE_SIZE 200
#elif TABLE_SIZE<50
#undef TABLE_SIZE
#define TABLE_SIZE 50
#else
#undef TABLE_SIZE
#define TABLE_SIZE 100
#endif
int table[TABLE_SIZE];
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Why multiple inheritance is not allowed?
What is polymorphism in oop example?
How to hide the base class functionality in Inheritance?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
What is object and example?
What is constructor in oop?
Is oop better than procedural?
Why do we need polymorphism in c#?
What is object in oops?
Can static class have constructor?
Why do we use encapsulation in oops?
What is difference between inheritance and polymorphism?
What does and I oop mean in text?
What is coupling in oop?
Write a program to reverse a string using recursive function?