Select the correct option to test your answer:
More Computer Questions
What will be the output of the following C# code? namespace ConsoleApplication4 { abstract class A { public int i; public abstract void display(); } class B: A { public int j; public int sum; public override void display() { sum = i + j; Console.WriteLine(+i + "\n" + +j); Console.WriteLine("sum is:" +sum); } } class Program { static void Main(string[] args) { A obj = new B(); obj.i = 2; B obj1 = new B(); obj1.j = 10; obj.display(); Console.ReadLine(); } } }
What will be the output of the following C code? #include<stdio.h> #define hello 10 main() { #ifdef hello #undef hello #define hello 100 #else #define hello 200 #endif printf("%d",hello); }
In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is?
What is the result of the expression sizeof(char*) in C, assuming a char pointer on a typical system?
What is the output of the following code: char str[] = "Hello"; cout << str; in C++?