Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

c programming

 
sree ramkumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir, i have attened one interview.they rise question from c programming.i answer all question, can't able to answer one question that is
"WHICH MATHEMATICAL OPERATOR IS NOT AVAILABLE IN C PROGRAMMING ". REQUEST YOU REPLY...
 
Ryan McGuire
Ranch Hand
Posts: 1072
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exponentiation? There is no single operator in C that does that operation.

BUT... is there an explicit real-world exponentiation "operator"? That operation is implied by the relative position and size of the terms involved without any intervening symbol (such as the + for addition).

Also, even though exponentiation isn't built into C, there is a standard library function that performs the operation, which comes with every C ompiler I've ever used.
 
Anand Hariharan
Rancher
Posts: 272
C++ Debian VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ryan McGuire:

BUT... is there an explicit real-world exponentiation "operator"? That operation is implied by the relative position and size of the terms involved without any intervening symbol (such as the + for addition).


Perhaps not in the real-world language of mathematics, but there are reasonably main-stream programming languages that define an operator for exponentiation. Examples are ^ and **.

I guess C does not have an operator because there is no mainstream hardware / instruction set that includes an instruction for exponentiation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic