What is the difference between = and == in C?
Answer Posted / k.s. karthick prabu
= is the assigment operator
=is used to copy
ex:
a=5 means, copy just that value for 'a'.
== is comparision operator
ex:
#include<stdio.h>
void main()
{
int a;
scanf("%d",&a);
if(a==5)
printf("welcome");
else
printf("if the is not equal to 5");
}
Is This Answer Correct ? | 37 Yes | 7 No |
Post New Answer View All Answers
What is the best c++ book for beginners?
What data encapsulation is in c++?
What is the benefit of c++?
What is class and structure in c++?
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
What is pointer to array in c++?
What is the difference between c++ and turbo c++?
What is split a string in c++?
the first character in the variable name must be an a) special symbol b) number c) alphabet
What things would you remember while making an interface?
What is oop in c++?
What is a constructor in c++ with example?
What is the difference between while and do while loop? Explain with examples.
How is modularity introduced in C++?
What is an adjust field format flag?