0% found this document useful (0 votes)
8 views28 pages

Chat GPT

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views28 pages

Chat GPT

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

1/9/25, 12:02 PM ChatGPT

ChatGPT 4o mini Log in


2. Which operator is used to check equality in C#? a)
b) =
c) ===
d) !=

Answer: a) ==

3. Which of the following operators can be used to increment a value by 1? a) ++


b) --
c) +=
d) += 1

Answer: a) ++

4. What does the ternary operator ( ?: ) in C# do? a) It performs a conditional


operation between two operands.
b) It checks for null references.
c) It performs the logical AND operation.
d) It swaps the values of two variables.

Answer: a) It performs a conditional operation between two operands.

5. Which of the following is NOT a valid assignment operator in C#? a) =


b) +=
c) -=
d) ==

Answer: d) ==

6. What is the result of the expression 5 / 2 in C#? a) 2


b) 2.5
c) 3
d) 2.0

Answer: a) 2 (integer division, truncates the decimal part)

7. Which of the following operators is used for modulus operation in C#? a) %


b) /

Message ChatGPT

ChatGPT can make mistakes. Check important info. ?

https://chatgpt.com 1/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 2/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 3/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 4/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 5/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 6/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 7/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 8/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 9/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 10/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 11/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 12/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 13/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 14/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 15/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 16/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 17/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 18/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 19/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 20/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 21/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 22/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 23/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 24/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 25/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 26/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 27/28
1/9/25, 12:02 PM ChatGPT

https://chatgpt.com 28/28

You might also like