983 views

1 Answer

2 votes
2 votes

If by "context" you meant, the operators which behave differently as per usage (context).

then Yes, there are operators which are context dependent. Usually these are the ones which can be used can both unary and binary operators. Though I am not sure if we can call them context dependent, as they are different operators (because of being in different categories unary and binary) but have same symbol.

For example: $*$ which can be unary and binary. 

print("%d", *a);         ----> is a deference operator

print("%d", a*b);       ----> is a multiplication operator

Others are &, which can be used to print address of in unary form while is logical AND when used in binary form.

I am able to think of these operators only...Others to add more..

Related questions

0 votes
0 votes
2 answers
1
saurabh111 asked Sep 8, 2018
284 views
what is binding in c ??
0 votes
0 votes
0 answers
2
Na462 asked Aug 22, 2018
469 views
What will be output ?A. Abnormal Termination.B. Infinite loopC. Output wil be 65536D. NoneAns. D
0 votes
0 votes
2 answers
3
akankshadewangan24 asked Apr 14, 2017
732 views
#include <stdio.h #define foo(a,b) #b int main(void) { int a=10,b=15,ab=20; // your code goes here printf("%d",ab+foo(a,b)); return 0; } What is the output?
1 votes
1 votes
1 answer
4
jugnu1337 asked May 10, 2022
262 views
SOURCE NAME::: UNDERSTANDING POINTER IN C (BOOK) BY YASHWANT KANETKARmy answer is C am i right?