IF Statement of C Language

What is IF Statement in Conditional Statement

Ans If statement is used when we want to test a condition.

Syntax :-

If ()

{

//statements ; 

 

}

Program :-

#include<stdio.h>

#include<conio.h>

 

Void main()

{

Int password;

Clrscr();

 

Printf(“entre the password”);

Scanf(“%d”,&password);

 

If(password==213)

{

Printf(“hello gagan”);

}

Printf(“no entre the password\n”);

Getch();

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *