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
write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.
What is the extension of c++?
What is flush programming?
What happens when you make call 'delete this;'?
What does flush do?
Define a pdb file.
Which field is used in c++?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
What is the history of c++?
Is c++ used anymore?
What is the difference between global variables and local variable
Is swift a good first language?
What is a forward referencing and when should it be used?
What are the benefits of oop in c++?
What are smart pointers?