Home / Programming Questions / C # MCQs / Page 1

C # MCQs with answers Page - 1

Dear candidates you will find MCQ questions of C # here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) 8
(B) 4
(C) 2
(D) 1
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) System.Int16
(B) System.UInt32
(C) System.UInt64
(D) System.UInt16
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) int a = 32, b = 40.6;
(B) int a = 42; b = 40;
(C) int a = 32; int b = 40;
(D) int a = b = 42;
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

Code:
Static Void Main(String[] args)
 {
     const int m = 100;
     int n = 10;
     const int k = n / 5 * 100 * n ;
     Console.WriteLine(m * k);
     Console.ReadLine();
 }
(A) ‘k’ should not be declared constant
(B) Expression assigned to ‘k’ should be constant in nature
(C) Expression (m * k) is invalid
(D) ‘m ‘ is declared in invalid format
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) long < short < int < sbyte
(B) sbyte < short < int < long
(C) short < sbyte < int < long
(D) short < int < sbyte < long
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) sbyte
(B) short
(C) int
(D) long
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) ii
(B) Both i, ii
(C) i
(D) None of the mentioned
S
Shyam Dubey ·
Coach · 50.57K points
Bookmark
Report

(A) c = a + b;
(B) c = a + int(float(b));
(C) c = a + convert.ToInt32(b);
(D) c = int(a + b);

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.