Home / MCQ Bank / Computer
Computer Pointer Difficulty: Medium

What would be the output for the following Turbo C code? #include<stdio.h> void main() { int a[]={ 1, 2, 3, 4, 5 }, *p; p=a; ++*p; printf("%d ", *p); p += 2; printf("%d", *p); }

Select the correct option to test your answer:

More Computer Questions

What will be the output of the following Java program? public class BoxDemo { public static <U> void addBox(U u, java.util.List<Box<U>> boxes) { Box<U> box = new Box<>(); box.set(u); boxes.add(box); } public static <U> void outputBoxes(java.util.List<Box<U>> boxes) { int counter = 0; for (Box<U> box: boxes) { U boxContents = box.get(); System.out.println("Box #" + counter + " contains [" + boxContents.toString() + "]"); counter++; } } public static void main(String[] args) { java.util.ArrayList<Box<Integer>> listOfIntegerBoxes = new java.util.ArrayList<>(); BoxDemo.<Integer>addBox(Integer.valueOf(10), listOfIntegerBoxes); BoxDemo.outputBoxes(listOfIntegerBoxes); } } What will be the output of the following Java code snippet? enum Enums { A, B, C; private Enums() { System.out.println(10); } } public class MainClass { public static void main(String[] args) { Enum en = Enums.B; } } The document produced by knitr document has which of the following extension? What is a portion of memory that serves as a temporary repository for data as it waits for a given action? The code marker option does not create . . . . . . . .