Questions

Q:

What are the operating system components?

Answer

- Process management


- Main memory management


- File management


- I/O system management


- Secondary storage management


- Networking


- Protection system


- Command interpreter system

Report Error

View answer Workspace Report Error Discuss

2 2680
Q:

What would be the output of the following program?

main()

{

   struct emp

   {

        char *n;

        int age;

   };

   struct emp e1 = { "Dravid", 23};

   struct emp e2 = e1;

   strupr (e2.n);

   printf ("\n%s",e1.n);

}

Answer

DRAVID


When a structure is assigned, passed, or returned, the copying is done monolithically. This means that the copies of any pointer fields will point to the same place as the original. In other words, anything pointed to is not copied. Hence, on changing the name through e2.n it automatically changed e1.n

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2679
Q:

Write a c program for binary search.

Answer

#include<stdio.h>
int main(){

    int a[10],i,n,m,c=0,l,u,mid;

    printf("Enter the size of an array: ");
    scanf("%d",&n);

    printf("Enter the elements in ascending order: ");
    for(i=0;i<n;i++){
         scanf("%d",&a[i]);
    }

    printf("Enter the number to be search: ");
    scanf("%d",&m);

    l=0,u=n-1;
    while(l<=u){
         mid=(l+u)/2;
         if(m==a[mid]){
             c=1;
             break;
         }
         else if(m<a[mid]){
             u=mid-1;
         }
         else
             l=mid+1;
    }
    if(c==0)
         printf("The number is not found.");
    else
         printf("The number is found.");

    return 0;
}

Sample output:
Enter the size of an array: 5
Enter the elements in ascending order: 4 7 8 11 21
Enter the number to be search: 11
The number is found.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2679
Q:

Which of the following is not a video file extension?

A) .flv B) .mov
C) .mp3 D) None of the above
 
Answer & Explanation Answer: C) .mp3

Explanation:

.mp3 is audio file extension.

Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

6 2679
Q:

Which country has the oldest National Anthem?

A) India B) Denmark
C) Japan D) China
 
Answer & Explanation Answer: C) Japan

Explanation:

The Japanese national anthem, "Kimigayo", has the oldest lyrics, which were taken from a Heian period (794–1185) poem.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2679
Q:

Which statement best describes the relationship between science and technology?

A) Technology is a branch of science. B) Advances in science can lead to new technology.
C) Without technology there is no science. D) Technology is not related to science.
 
Answer & Explanation Answer: B) Advances in science can lead to new technology.

Explanation:

The aim of science is to get an understanding of the natural world, while the aim of technology is to use that understanding to improve people's lives. 

 

Hence, Advances in science can lead to new technology.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

3 2678
Q:

A 4 kg object is moving horizontally with a speed of 5 m/s. To increase its speed to 10 m/s, the amount of net work required to be done on this object is:

A) 150 J B) 100 J
C) 50 J D) 75 J
 
Answer & Explanation Answer: A) 150 J

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: CAT , Bank Exams , AIEEE

2 2677
Q:

The Nobel Prize in Economics was started in

A) 1901 B) 1936
C) 1957 D) 1967
 
Answer & Explanation Answer: D) 1967

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

4 2677