ExamVeda
Login
Home
61
How many swaps are required for reversing an array having n elements where n is an even number?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
62
Consider the following piece of code in C++, how many elements will be stored in the array 'arr' if the user enters the values of a, b, c and d as 10, 20, 30, and 40 respectively?
#include<iostream>                                                  
using namespace std;                                                    
int main() 
{                                                                               
    int a, b, c, d;                                                        
    cout<<”Enter the value of a, b, c, d: “;                       
    cin>>a>>b>>c>>d;                
    int arr[a - b/c + d];                                                 
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
63
Suffix array is space efficient than the suffix tree.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
64
Predefined function reverse() in C++ is available under which header file?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
65
Which of the following is a disadvantage of parallel array over the traditional arrays?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
66
What will be the resulting array after rotating arr[]={1, 2, 3, 4, 5} by 2?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
67
What will be the output of the following code?
#include <iostream>
using namespace std;
int main()
{   
    int arr[] = {1,2,3,4,5,6};
    int n = sizeof(arr)/sizeof(arr[0]);
    int d=4;
    int temp[10];
 
    for(int i=0;i<d;i++)
    temp[i]=arr[i];
 
    int j=0;
    for(int i=d;i<n;i++,j++)
    arr[j]=arr[i];
 
    int k=0;
    for(int i=n-d;i<n;i++,k++)
    arr[i]=temp[k];
 
    for(int i=0;i<n;i++)
    cout<<arr[i]<<" ";
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
68
Which of the following bitwise operator will you use to invert all the bits in a bit array?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
69
In which of the following cases dynamic arrays are not preferred?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
70
What will be the minimum number of jumps required to reach the end of the array arr[] ={0,1,3,6,3,6,8,5}?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board