Write a program in C to check whether the two given numbers are equal but using = instead of ==

C Programming Language / Decision Making of C Language

5468

Program:

#include <stdio.h>
int main()
{
	int a=2, b=3;
	if(a = b)
		printf("EQUAL");
	else
		printf("UNEQUAL");
		
	getch();	
	return 0;
}

Output:

EQUAL

Explanation:

if(a = b) In this statement b is assign in b
fro that the output is EQUAL

This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.