What is the difference between declaration and definition?
Answer Posted / sanjay
The definition is the one that actually allocates space,
and provides an initialization value, if any.
There can be many declarations, but there must be exactly
one definition. A definition tells the compiler to set
aside storage for the variable. A declaration makes the
variable known to parts of the program that may wish to use
it. A variable might be defined and declared in the same
statement
| Is This Answer Correct ? | 57 Yes | 5 No |
Post New Answer View All Answers
What are the two different types of polymorphism?
What is object in oop with example?
What is constructor in oop?
How do you achieve runtime polymorphism?
What is the main purpose of inheritance law?
#include
What is the real life example of polymorphism?
What is encapsulation with real life example?
What does and I oop mean in text?
Can a varargs method be overloaded?
What is oops and why we use oops?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
What is a class in oop?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What is persistence in oop?