Saturday, 15 February 2014

C Programming Code for Shutdown Windows 7/8

#include <stdio.h>
#include <stdlib.h>

main()
{
   char ch;

   printf("Do you want to shutdown your computer now (y/n)\n");
   scanf("%c",&ch);

   if (ch == 'y' || ch == 'Y')
      system("C:\\WINDOWS\\System32\\shutdown /s");

   return 0;

}

Saturday, 3 August 2013

Facebook Page of Innovators With C

After huge demand of students, we have recently created Facebook Page of Innovators With C for C/C++ programming. On this page we will be updating the information and posts about this website. If you are on facebook, you can like this page just by clicking on LIKE button on the right side of Facebook Page. Innovators With C Programming Facebook Page will provide you material about Programming Language and other related references about C/C++ programming and concepts

Join us on Facebook Now :)

break and continue Statement

There are two statement built in C, break; and continue; to interrupt the normal flow of control of a program. Loops performs a set of operation repeatedly until certain control variable fails but, it is sometimes desirable to skip some statements inside loop and terminate the loop immediately without checking the test expression. In such cases, break and continue statements are used.

C break statement:
In C programming, break is used in terminating the loop immediately after it is encountered. The break statement is used with conditional if statement.

Syntax of break statement:

break; 
 
The break statement can be used in terminating all three loops for, while and do...while loops.


For better understanding of how break statements works in C programming loops. Analyze the illustration of exiting a loop with break statement below.


C continue statement:
It is sometimes desirable to skip some statements inside the loop. In such cases, continue statements are used. Continue statements are only used in while, do...while and for loops in C programming.

Syntax of continue statement:
continue; 
 
Just like break, continue is also used with conditional if statement.

 For better understanding of how continue statements works in C programming. Analyze the illustration of bypassing and continuing in loops below.