Wednesday, 30 August 2017

Printf() Return value

Printf( ) Return value


Yield capacities:-

printf ( ) is a library work that showcases data on screen. It return esteem is add up to characters of inside the sections and discharge space likewise checked. It checked the quantity of caharacter on the printf work. For instance consider the "Welcome to C program". In this announcement 23 characters are there, when the printf work run then it will considered an arrival esteems and in the event that you need print then you appoint some factor then you can print it on screen.

PROGRAM:-

#include<stdio.h>
#include<conio.h>
void main ( )
{
int a;
clrscr ();
a = printf ( "Welcome to C programme\n");
printf ( "%d\n" , a);
getch ( );
}
OUTPUT:-

Output
Welcome to C programme
23

Tuesday, 29 August 2017

Scanf( ) Return value

Scanf( ) Return value

Info capacities:- 


Scanf( ) is a library work that is utilized for input work. It return valuet depends on the either input esteem is right or not. On the off chance that esteem is right then it will return 1, else return 0. For instance in the event that you pronounce whole number esteem however your information is roast then it will indicate 0, Otherwise you input is number at that point it's arrival esteem 1. For this situation of Scanf( ) work Return esteem is either 0, 1 or EOF.
Return value of Scanf( ) function is clearly explain by following example program

PROGRAM:-


#include<stdio.h>
#include<conio.h>
void main ( )
{
int a , b ;
clrscr ();
a = 10 ; b = 2 ;
printf ( "The value of a and b is %d %d\n" , a , b );
printf ( "Addition of a , b is %d\n" , a + b );
printf ( "Subtraction of a , b is %d\n" , a - b );
printf ( "Mutiplication of a , b is %d\n" , a * b );
printf ( "Division of a , b is %d\n" , a / b );
printf ( "Modulo of a , b is %d\n" , a % b );
getch ( );
}
OUTPUT:-

Output
78
1

Switch-Case()

Switch - Case ( ) 


Switch Case proclamation resembles an if explanation and it permit to us settle on choice from the quantity of decision. The information is just a single contention and that is any information sort and it check case alternative. At the point when case is accessible at that point execute case generally default proclamation will be executed.

grammar:-


switch( choice )
{

Statement 1;

Break;
}
case 1:
{

Statement 2;

Break;
}
case 2:
{

Statement 3;

Break;
}
case n:
{

Statement 4;

Break;
}
default:
{

Default - Statement 5;

Break;
}

Example Programme of If - Else if ( ) Statements:-


#include<stdio.h>
#include<conio.h>
void main ( )
{
int choice ;
clrscr ( );
printf ( "Enter the Vowel letters\n");
scanf ( "%d" , choice );
switch ( choice )
{
case 'a' :
{
printf ( "\nYour entered letter is Vowel" );
break ;
}
case 'e' :
{
printf ( "\nYour entered letter is Vowel" );
break ;
}
case 'i' :
{
printf ( "\nYour entered letter is Vowel" );
break ;
}
case 'o' :
{
printf ( "\nYour entered letter is Vowel" );
break ;
}
case 'u' :
{
printf ( "\nYour entered letter is Vowel" );
break ;
}
default:
{
printf ( "\nYour entered letter is Not Vowel" );
break ;
}
}
getch ( );
}
OUTPUT:-

Output
Enter the Vowel letters
a
Your entered letter is Vowel

Saturday, 26 August 2017

Programizs

Welcome to Computer essentials. The fundamental thought process this site to build up a Computer nuts and bolts to all. In windows working framework have many capacity and that are give our windows traps labels. A great many dislike only content of traps. In our site give content, previews and still you experience difficulty with trap then you can pick video instructional exercise for that traps.



For PC traps we should know some essential dialects and that are C and C++. That is additionally we give essential dialects text,snapshots and video instructional exercises. You can without much of a stretch comprehend and you may likewise test yourself in your Laptop or PC.