IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C# Programming Java Programming
Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - Expressions - Discussion

@ : Home > C Programming > Expressions > General Questions - Discussion

Read more:

"Nothing is impossible to a willing heart."
- (Proverb)
5. 

Which of the following are unary operators in C?
1. !
2. sizeof
3. ~
4. &&

[A]. 1, 2[B]. 1, 3
[C]. 2, 4[D]. 1, 2, 3

Answer: Option E

Explanation:

An operation with only one operand is called unary operation.
Unary operators:
! Logical NOT operator.
~ bitwise NOT operator.
sizeof Size-of operator.

&& Logical AND is a logical operator.

Therefore, 1, 2, 3 are unary operators.


Virendra said: (Tue, Mar 22, 2011 06:50:13 AM)    
 
Are you mean that Logical NOT operator is not logical operator?

Akshay said: (Tue, Jun 7, 2011 06:04:18 AM)    
 
@Virendra: Unary operators are those who do not refer values at the left of the operation. e.g.!1 will return 0 you need not compare or evaluate two values. See Unary and Binary operator overloading to understand the concept more.

Harsh said: (Sat, Jan 21, 2012 12:30:56 AM)    
 
The unary operator are ~, ++, --, sizeof, !

Write your comments here:
Name *:     Email:


© 2008-2011 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Advertise     Contact us: info@indiabix.com     Follow us on twitter!