हिंदी

CISCE ISC (Commerce) कक्षा १२ Important Questions for Computer Science (Theory) - Statements and their Scope

अध्याय

All topics
Advertisements
Advertisements

Chapter wise important questions with answers and solutions for Computer Science (Theory) in CISCE ISC (Commerce) कक्षा १२.

The following function is a part of some class which is used to find the smallest digit present in a number. There are some places in the code marked by ?1?, ?2?, ?3? which must be replaced by an expression/a statement so that the function works correctly.

int small_dig(int n)
{   int min=?1?;
    while(n!=0)
    {
    int q=n/10;
    int r=?2?*10;
    min=r>min ? ?3? : r;
    n=q;
    }
    return min;
} 
    
  1. What is the expression or statement at ?1?
  2. What is the expression or statement at ?2?
  3. What is the expression or statement at ?3?
Appears in 1 प्रश्न पत्र
अध्याय: [8] Statements and their Scope
Concept: Looping (For, While-do, Do-while, Continue, Break)
Advertisements
Share
Notifications



      Forgot password?
Use app×