N Nguyên Lê New member Sep 17, 2021 #1 In C++ what type of operator is a cast operator? A. Unary B. Binary C. Ternary D. Quaternary
N Nguyễn Linh Trang New member Sep 17, 2021 #2 Answer: A Explanation: The cast operator is a unary operator which is used to convert one data type into another forcefully. One example is: Code: void setup() { float f=34.5; int i = static_cast<int>(f); } The code above results in the variable ‘i’ having a value of 34 stored in it. Upvote 0 Downvote
Answer: A Explanation: The cast operator is a unary operator which is used to convert one data type into another forcefully. One example is: Code: void setup() { float f=34.5; int i = static_cast<int>(f); } The code above results in the variable ‘i’ having a value of 34 stored in it.