CISCE ISC (Commerce) इयत्ता १२ Important Questions for Computer Science (Theory) - Statements and their Scope
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;
}
- What is the expression or statement at ?1?
- What is the expression or statement at ?2?
- What is the expression or statement at ?3?
पाठ: [8] Statements and their Scope
Concept: Looping (For, While-do, Do-while, Continue, Break)
