1. Which three form part of correct array declarations? public int a [ ] static int [ ] a public [ ] int a private int a [3] private int [3] a [ ] public final int [ ] a





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 02 Jun 2017 01.26 am
    (1), (2) and (6) are valid array declarations. Option (3) is not a correct array declaration. The compiler complains with: illegal start of type. The brackets are in the wrong place. The following would work: public int[ ] a Option (4) is not a correct array declaration. The compiler complains with: ']' expected. A closing bracket is expected in place of the 3. The following works: private int a [] Option (5) is not a correct array declaration. The compiler complains with 2 errors: ']' expected. A closing bracket is expected in place of the 3 and <identifier> expected A variable name is expected after a[ ] .
Show Similar Question And Answers
QA->.In the question below three words are given.They are followed by four words one of which stands for the class to which these three words belong.Identify that word:Barbarous,Crude,Rude....
QA->A pendulum clock is set to give correct time at the sea level. This clock is moved to a hill station at an altitude of 2500m above the sea level. In order to keep correct time on the hill station, the length of the pendulum?....
QA->The electric charge built upon a material as a static mode?....
QA->What is the opposite of a static website?....
QA->Which Indian batsman made three consecutive centuries in his first three Test matches?....
MCQ->Which three form part of correct array declarations? public int a [ ] static int [ ] a public [ ] int a private int a [3] private int [3] a [ ] public final int [ ] a....
MCQ->Which of the following statements are correct about the C#.NET code snippet given below? int[] a = {11, 3, 5, 9, 4}; The array elements are created on the stack. Refernce a is created on the stack. The array elements are created on the heap. On declaring the array a new array class is created which is derived from System.Array Class. Whether the array elements are stored in the stack or heap depends upon the size of the array.....
MCQ->Which of the following statements are correct about static functions? Static functions can access only static data. Static functions cannot call instance functions. It is necessary to initialize static data. Instance functions can call static functions and access static data. this reference is passed to static functions.....
MCQ->What will be the output of the program? public class Test { public static int y; public static void foo(int x) { System.out.print("foo "); y = x; } public static int bar(int z) { System.out.print("bar "); return y = z; } public static void main(String [] args ) { int t = 0; assert t > 0 : bar(7); assert t > 1 : foo(8); / Line 18 / System.out.println("done "); } }....
MCQ->Which of the following statement is correct about the program given below? #include<iostream.h> static int Result; class India { public: void Change(int x = 10, int y = 20, int z = 30) { cout<< x + y + z; } void Display(int x = 40, float y = 50.00) { Result = x % x; cout<< Result; } }; class Bix { int x, y; public: void Change(int x, int y = 50) { cout<< x + y; } }; class IndiaBix: public India, public Bix { public: void Display(int x = 10, int xx = 100, int xxx = 1000) { Result = x + xx % x x; cout<< Result ; } }; int main() { IndiaBix objBix; objBix.India::Display(10, 20.00); return 0; }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution