Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
CPP All : Tricks in Loops - break continue scope
Concept Learning Code Sheets

Sum of sales using break in while loop #2071

Program to demonstrate an infinite while loop and the use of break in loop

Sum of sales using break in for loop #2073

Program to demonstrate an infinite for loop and the use of break in loop

Empty code block in a for loop #2078

Demonstration of empty code block in a for loop for using the loop as a delay loop.

Odd number series using continue in the for loop #2085

Program to print the series of odd numbers using an alternative technique of using the continue within the for loop.

Odd number series using continue in the while loop #2088

Program to print the series of odd numbers using an alternative technique of using the continue within the while loop.

Scope of variables declared inside loop #2092

Reuse  of variable declared in a loop scope for another loop.


Solved Problems

Excluding Numbers divisible by 2 or by 3 #2094

Write the output of the following program. Assume that required header files

Write the output of the following program. Assume that required header files are included.

int main()
{
  for(int i=1;i<=30;++i)
  {
    if(i%2==0 || i%3==0) continue;
    else cout<<i<<" ";
  }
  return 0 ;
}

Tee Shirts Selection By Sports Teacher #5011

A sports teacher has been confidentially asked to reject the persons whose Te

A sports teacher has been confidentially asked to reject the persons whose Tee-shirt numbers are divisible by 10. Make a program to help this teacher collect the T-shirt numbers one by one and stop counting when 10 persons have been counted. Keep printing the selected Tee-shirt numbers.


Code Sheets:6  Solved Problems:2 
×
Introductory Sessions Beginning to Program Tokens Keyword and Identifiers Data Types Variables and Constants Operators Simple User Input Building Expressions and Formulas Simple Real World Problems Simple If and If Else Multiple-Nested-Ladder of If Else Switch case selection Simple Loops Tricks in Loops - break continue scope Loop Applications - Handling numerals Series printing loops Nested Loops Pattern printing loops Number Varieties and Crunches String Handling (Null Terminated) Strings - string class type Functions (Built-in) Functions - user defined Functions Reference Passing/Returning Arrays Concepts and 1-D Arrays Array Data Management Two dimensional arrays and Matrices Structures Basics Structures passing/returning Display Using IO Manipulation Display Using C Formatting Tricks User Defined Data Types Enumerated Types Preprocessor Directives And Macros Exception Handling Programming Paradigms and OOPs Advantages Abstraction and Encapsulation Polymorphism Inheritance Function Overloading Concepts Function Overloading Varieties Function Overloading Special Cases Defining Classes Creating and Using Class Objects Class Members Accessibility Class Function Types Inline Functions Constant Functions Nesting of Functions Class Members Scope Resolution Static Members in a Class Array of Objects Constructor Concepts Default Constructor Parameterized Constructor Copy Constructor Constructor Overloading Destructors Inheritance Fundamentals Public Derivations Private and Protected Derivations Multiple Inheritance Mult-Level Inheritance Class Nesting Data File Concepts Handling Text Files Handling Binary Files Pointer Concepts Pointer and Arrays Pointers and Functions Object Pointers This Pointer Linked Lists Stacks Queues


Back