Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Operators
What will be the output of the C#.NET code snippet given below? int i, j = 1, k; for (i = 0; i < 5; i++) { k = j++ + ++j; Console.Write(k + " "); }
8 4 16 12 20
4 8 12 16 20
4 8 16 32 64
2 4 6 8 10
Correct Answer:
4 8 12 16 20
Next Question→
More Questions from
Operators
Which of the following is NOT an Arithmetic operator in C#.NET?
What will be the output of the C#.NET code snippet given below? int a = 10, b = 20, c = 30; int res = a < b? a < c? c : a : b; Console.WriteLine(res);
Which of the following statements are correct? The conditional operator (?:) returns one of two values depending on the value of a Boolean expression. The as operator in C#.NET is used to perform conversions between compatible reference types. The &* operator is also used to declare pointer types and to dereference pointers. The -> operator combines pointer dereferencing and member access. In addition to being used to specify the order of operations in an expression, brackets [ ] are used to specify casts or type conversions.
Which of the following is the correct output for the C#.NET code snippet given below? Console.WriteLine(13 / 2 + " " + 13 % 2);
Which of the following statements is correct about Bitwise | operator used in C#.NET?
Which of the following statements is correct about Bitwise ^ operator used in C#.NET?
Which of the following are NOT Relational operators in C#.NET? >= != Not <= <>=
What will be the output of the C#.NET code snippet given below? int num = 1, z = 5; if (!(num <= 0)) Console.WriteLine( ++num + z++ + " " + ++z ); else Console.WriteLine( --num + z-- + " " + --z );
Which of the following is NOT a Bitwise operator in C#.NET?
Which of the following is NOT an Assignment operator in C#.NET?
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments