Computer Applications
How is following statement different from statement given in previous question ?Student stud1 = new Student( );
Related Questions
Why are classes said to be abstractions of or a set of objects ?
Why are objects said to be instances of a class ?
Consider the following code fragment assuming that a class namely Student has been defined earlier :
Student stud1;What is above statement doing ?
Write a program to accept a number and check whether it is a 'Spy Number' or not. (A number is spy if the sum of its digits equals the product of its digits.)
Example: Sample Input: 1124
Sum of the digits = 1 + 1 + 2 + 4 = 8
Product of the digits = 1*1*2*4 = 8