Home / MCQ Bank / Computer
Computer Classes And Objects In C Sharp

What will be the output of the following C# code? enum days:int { sunday = -3, monday, tuesday } Console.WriteLine((int)days.sunday); Console.WriteLine((int)days.monday); Console.WriteLine((int)days.tuesday);

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option C • -3 -2 -1

Related Computer Questions

What will be the output of the following C# code snippet? class Program { static void Main(string[] args) { double x = 3.14; int y = (int) Math.Ceiling(x); Console.WriteLine(y); } } What will be the output of the following Python code? >>>list1 = [11, 2, 23] >>>list2 = [11, 2, 2] >>>list1 < list2 In a queue, how do you determine if the queue is full when using a fixed-size array? Which of the following errors will occur when the below code is executed? #include<stdio.h> int cat_number(int n) { int i,j,arr[n],k; arr[0] = 1; for(i = 1; i < n; i++) { arr[i] = 0; for(j = 0,k = i - 1; j < i; j++,k--) arr[i] += arr[j] * arr[k]; } return arr[n-1]; } int main() { int ans, n = 100; ans = cat_number(n); printf("%d\n",ans); return 0; } What will be the output of the following C code? #include <stdio.h> struct student { char *c; struct student *point; }; void main() { struct student s; printf("%d", sizeof(s)); }