9501. While defining a variable argument list function we drop the ellipsis(...)?
9502. Is it necessary that in a function which accepts variable argument list there should be at least be one fixed argument?
9503. Can we write a function that takes a variable argument list and passes the list to another function?
9504. Can the fixed arguments passed to the function that accepts variable argument list, occur at the end?
9505. It is necessary to call the macro va_end if va_start is called in the function.
9506. The macro va_arg is used to extract an argument from the fixed micro argument list and advance the pointer to the next argument.
9507. What will be the output of the program? #include<stdio.h> #include<stdarg.h> void fun(char msg, ...); int main() { fun("IndiaBIX", 1, 4, 7, 11, 0); return 0; } void fun(char msg, ...) { va_list ptr; int num; va_start(ptr, msg); num = va_arg(ptr, int); num = va_arg(ptr, int); printf("%d", num); }
9508. What will be the output of the program? #include<stdio.h> #include<stdarg.h> void fun1(char, int, int , float , char ); void fun2(char ch, ...); void (p1)(char, int, int , float , char ); void (p2)(char ch, ...); int main() { char ch='A'; int i=10; float f=3.14; char p="Hello"; p1=fun1; p2=fun2; (p1)(ch, i, &i, &f, p); (p2)(ch, i, &i, &f, p); return 0; } void fun1(char ch, int i, int pi, float pf, char p) { printf("%c %d %d %f %s \n", ch, i, pi, pf, p); } void fun2(char ch, ...) { int i, pi; float pf; char p; va_list list; printf("%c ", ch); va_start(list, ch); i = va_arg(list, int); printf("%d ", i); pi = va_arg(list, int); printf("%d ", pi); pf = va_arg(list, float); printf("%f ", pf); p = va_arg(list, char ); printf("%s", p); }
9509. What will be the output of the program? #include<stdio.h> #include<stdarg.h> void dumplist(int, ...); int main() { dumplist(2, 4, 8); dumplist(3, 6, 9, 7); return 0; } void dumplist(int n, ...) { va_list p; int i; va_start(p, n); while(n-->0) { i = va_arg(p, int); printf("%d", i); } va_end(p); printf("\n"); }
9510. What will be the output of the program? #include<stdio.h> #include<stdarg.h> void display(int num, ...); int main() { display(4, 'A', 'B', 'C', 'D'); return 0; } void display(int num, ...) { char c, c1; int j; va_list ptr, ptr1; va_start(ptr, num); va_start(ptr1, num); for(j=1; j<=num; j++) { c = va_arg(ptr, int); printf("%c", c); c1 = va_arg(ptr1, int); printf("%d\n", c1); } }
9511. What will be the output of the program? #include<stdio.h> #include<stdarg.h> void fun1(int num, ...); void fun2(int num, ...); int main() { fun1(1, "Apple", "Boys", "Cats", "Dogs"); fun2(2, 12, 13, 14); return 0; } void fun1(int num, ...) { char str; va_list ptr; va_start(ptr, num); str = va_arg(ptr, char ); printf("%s ", str); } void fun2(int num, ...) { va_list ptr; va_start(ptr, num); num = va_arg(ptr, int); printf("%d", num); }
9512. Saniya Mirza and Mahesh Bhupati won which of the following titles recently ?
9513. Can you play..............guitar
9514. Living here at the top of the mountain must be very _____.
9515. Mr. Kunwar Narayan who was selected for the Jnanpith Award (for 2005) recently is a famous poet and writer in—
9516. ...........she know that you are here?
9517. Which of the following is the correct output of the C#.NET code snippet given below? int[ , , ] a = new int[ 3, 2, 3 ]; Console.WriteLine(a.Length);
9518. Which of the following statements are correct about arrays used in C#.NET? Arrays can be rectangular or jagged. Rectangular arrays have similar rows stored in adjacent memory locations. Jagged arrays do not have an access to the methods of System.Array Class. Rectangular arrays do not have an access to the methods of System.Array Class. Jagged arrays have dissimilar rows stored in non-adjacent memory locations.
9519. Which of the following statements are correct about the C#.NET code snippet given below? int[][]intMyArr = new int[2][]; intMyArr[0] = new int[4]{6, 1, 4, 3}; intMyArr[1] = new int[3]{9, 2, 7};
9520. Which of the following are the correct ways to define an array of 2 rows and 3 columns? int[ , ] a; a = new int[2, 3]{{7, 1, 3},{2, 9, 6}}; int[ , ] a; a = new int[2, 3]{}; int[ , ] a = {{7, 1, 3}, {2, 9,6 }}; int[ , ] a; a = new int[1, 2]; int[ , ] a; a = new int[1, 2]{{7, 1, 3}, {2, 9, 6}};
9521. Which of the following statements is correct about the array declaration given below? int[][][] intMyArr = new int[2][][];
9522. Which of the following statements is correct about the C#.NET code snippet given below? int[] intMyArr = {11, 3, 5, 9, 4};
9523. Which of the following is the correct way to define and initialise an array of 4 integers? int[] a = {25, 30, 40, 5}; int[] a; a = new int[3]; a[0] = 25; a[1] = 30; a[2] = 40; a[3] = 5; int[] a; a = new int{25, 30, 40, 5}; int[] a; a = new int[4]{25, 30, 40, 5}; int[] a; a = new int[4]; a[0] = 25; a[1] = 30; a[2] = 40; a[3] = 5;
9524. Which of the following is the correct output of the C#.NET code snippet given below? int[][] a = new int[2][]; a[0] = new int[4]{6, 1, 4, 3}; a[1] = new int[3]{9, 2, 7}; Console.WriteLine(a[1].GetUpperBound(0));
9525. Which of the following is the correct way to obtain the number of elements present in the array given below? int[] intMyArr = {25, 30, 45, 15, 60}; intMyArr.GetMax; intMyArr.Highest(0); intMyArr.GetUpperBound(0); intMyArr.Length; intMyArr.GetMaxElements(0);
9526. What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i, j; int[ , ] arr = new int[ 2, 2 ]; for(i = 0; i < 2; ++i) { for(j = 0; j < 2; ++j) { arr[i, j] = i 17 + i 17; Console.Write(arr[ i, j ] + " "); } } } } }
9527. Which of the following statements are correct about the C#.NET code snippet given below? int[ , ] intMyArr = {{7, 1, 3}, {2, 9, 6}}; intMyArr represents rectangular array of 2 rows and 3 columns. intMyArr.GetUpperBound(1) will yield 2. intMyArr.Length will yield 24. intMyArr represents 1-D array of 5 integers. intMyArr.GetUpperBound(0) will yield 2.
9528. 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.
9529. Which one of the following statements is correct?
9530. If a is an array of 5 integers then which of the following is the correct way to increase its size to 10 elements?
9531. How will you complete the foreach loop in the C#.NET code snippet given below such that it correctly prints all elements of the array a? int[][]a = new int[2][]; a[0] = new int[4]{6, 1 ,4, 3}; a[1] = new int[3]{9, 2, 7}; foreach (int[ ] i in a) { / Add loop here / Console.Write(j + " "); Console.WriteLine(); }
9532. Which of the following countries is planning to launch its Moon Mission Space Vehicle named as Moon-LITE ?
9533. Which of the following books is written by Mr. Nandan Nilekani ?
9534. All his schemes fell ______ for want of money.
9535. Identify the wrongly spelt word:
9536. The members of the Rajya Sabha are elected by
9537. Which of the following statements are correct about Attributes used in C#.NET?
9538. Which of the following forms of applying an attribute is correct?
9539. Which of the following statements are correct about Attributes in C#.NET? On compiling a C#.NET program the attibutes applied are recorded in the metadata of the assembly. On compilation all the attribute's tags are deleted from the program. It is not possible to create custom attributes.. The attributes applied can be read from an assembly using Reflection class. An attribute can have parameters.
9540. Which of the following correctly describes the contents of the filename AssemblyInfo.cs?
9541. It possible to create a custom attribute that can be applied only to specific programming element(s) like ____ .
9542. Which of the following CANNOT be a target for a custom attribute?
9543. Once applied which of the following CANNOT inspect the applied attribute?
9544. Which of the following is the correct way to apply an attribute to an Assembly?
9545. Which of the following is the correct way of applying the custom attribute called Tested which receives two-arguments - name of the tester and the testgrade? Custom attribute cannot be applied to an assembly. [assembly: Tested("Sachin", testgrade.Good)] [Tested("Virat", testgrade.Excellent)]
class customer { / .... / } Custom attribute cannot be applied to a method. Custom attribute cannot be applied to a class.
9546. Attributes can be applied to Method Class Assembly Namespace Enum
9547. The [Serializable()] attribute gets inspected at
9548. Which of the following are correct ways to specify the targets for a custom attribute?
9549. Which of the following are correct ways to pass a parameter to an attribute? By value By reference By address By position By name
9550. Which of the following statements are correct about inspecting an attribute in C#.NET? An attribute can be inspected at link-time. An attribute can be inspected at compile-time. An attribute can be inspected at run-time. An attribute can be inspected at design-time.