Questions

Q:

Write a c program for insertion sort.

Answer

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

  int i,j,s,temp,a[20];

  printf("Enter total elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i<s;i++)
      scanf("%d",&a[i]);

  for(i=1;i<s;i++){
      temp=a[i];
      j=i-1;
      while((temp<a[j])&&(j>=0)){
      a[j+1]=a[j];
          j=j-1;
      }
      a[j+1]=temp;
  }

  printf("After sorting: ");
  for(i=0;i<s;i++)
      printf(" %d",a[i]);

  return 0;
}

Output:
Enter total elements: 5
Enter 5 elements: 3 7 9 0 2
After sorting:  0 2 3 7 9

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2888
Q:

Richest man in Asia 2018?

A) Mukesh Ambani B) Jack Ma
C) Prem Ji D) Lee
 
Answer & Explanation Answer: A) Mukesh Ambani

Explanation:

Indian business magnate Mukesh Ambani topples Jack Ma as Asia’s richest person as he positions Reliance Industries to disrupt the e-commerce space in India.

 

The chairman of India’s refining-to-telecoms conglomerate, Ambani was estimated to be worth US$44.3 billion in July 2018 with the share price of Reliance Industries rising 1.6 per cent to a record 1,099.8 rupees (US$16.05), according to Bloomberg Billionaires Index.

 

Jack Ma’s wealth stood at US$44 billion at the close of trading on the sameday in the US, where the company is listed.

Report Error

View Answer Report Error Discuss

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

5 2888
Q:

Calcium absorption is facilitated by the presence of

A) Vitamin D B) Vitamin C
C) Vitamin A D) Vitamin K
 
Answer & Explanation Answer: A) Vitamin D

Explanation:

The presence of vitamin D in the body enhances the absorption of calcium by the intestine.

Report Error

View Answer Report Error Discuss

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

5 2888
Q:

"The Law of Kepler" is related with which among the following ?

A) Planetary Motion B) Law of Conservation of energy
C) Law of Gravitation D) None
 
Answer & Explanation Answer: A) Planetary Motion

Explanation:

Kepler's laws of planetary motion are three scientific laws describing the motion of planets around the Sun.

  • Kepler’s three laws of planetary motion can be stated as follows:

(1) All planets move about the Sun in elliptical orbits, having the Sun as one of the foci.

(2) A radius vector joining any planet to the Sun sweeps out equal areas in equal lengths of time.

(3) The squares of the sidereal periods (of revolution) of the planets are directly proportional to the cubes of their mean distances from the Sun.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO , Network Engineer

14 2887
Q:

Which one of the following National Highways is the longest

A) NH-2 B) NH-7
C) NH-8 D) NH-15
 
Answer & Explanation Answer: B) NH-7

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

4 2887
Q:

Organisms that depend only on raw plant products are said to be 

A) herbivorous B) vegetarian
C) carnivorous D) omnivorous
 
Answer & Explanation Answer: A) herbivorous

Explanation:

Herbivorous organisms are those that take for their food, plant parts like leaves raw in contrast to vegetarian, which means that plant products are taken raw or after being cooked.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

3 2887
Q:

Write a c program to create dos command type.

Answer

#include
int main( int count,char * argv[] ) {
    int i;
    FILE *ptr;
    char *str;
    char ch;
    if( count == 1) {


         printf( "The syntax of the command is incorrect.\n" );
    }
    for( i=1;i<cout;i++ ){
         ptr=fopen(argv[i],"r");
         if(ptr==NULL){
             printf("The system cannot find the file specified.");
             if(count>2)
                 printf("\nError occurred while procesing : %s.\n",argv[i]);
         }
         else {
             if(count>2) {
                 printf("%s\n\n",argv[i]);
             }
             while((ch=getc(ptr))!=-1)
                 printf("%c",ch);
         }
         fclose(ptr);
    }
    return 0;
}


 


Save the above file as open.c, compile and execute the go to command mode (current working directory) and write: open xy.c (xy.c any file present in that directory)
To run the open command in all directories and drive you will have to give the path of current working directory in command mode. Write:
C:tc\bin>PATH c:\tc\bin
Now press enter key. Now your open command will work in all directory and drive.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2886
Q:

Monitoring and Controlling Process Group

What are the Project Management Processes included in Monitoring and Controlling Process Group?

Answer


    • Monitor and Control Project Work

    • Integrated Change Control

    • Scope Verification

    • Scope Control

    • Schedule Control

    • Cost Control

    • Perform Quality Control

    • Manage Project Team

    • Performance Reporting

    • Manage Stakeholders

    • Risk Monitoring and Control

    • Contract Administration


Report Error

View answer Workspace Report Error Discuss

0 2886