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 2891
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 2891
Q:

What is the purpose of the sigmoid colon?

Answer

Sigmoid colon or pelvic colon is a curved, S-shaped portion of the large intestine which is closest to the rectum and anus.


sigmoid_colon1532669660.jpg image


* It helps to transports fecal matter from the descending colon to the rectum and anus.


 


* It is the final segment of the colon.

Report Error

View answer Workspace Report Error Discuss

Subject: Biology Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

1 2891
Q:

Brainstorming is an example of

brainstorming_is_an_example_of1553165225.jpg image

A) Computer language B) Problem solving technique
C) Lightening effect D) None of the above
 
Answer & Explanation Answer: B) Problem solving technique

Explanation:

Brainstorming is an example of a problem solving technique of severe thinking.

Report Error

View Answer Report Error Discuss

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

3 2890
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 2889
Q:

The first female to take over the controls of a NASA spaceship is

A) Wilkie Collins B) Eileen Collins
C) Colette D) Kim Clijsters
 
Answer & Explanation Answer: B) Eileen Collins

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

0 2888
Q:

Where is the Forest Reserve Institute of India located

A) Bhopal B) Dehradum
C) Lucknow D) Delhi
 
Answer & Explanation Answer: B) Dehradum

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

7 2888
Q:

Phage typing is based on the fact that

A) viruses cause disease B) bacteria and viruses are related
C) bacteria are destroyed by viruses D) bacterial viruses attack specific cells
 
Answer & Explanation Answer: D) bacterial viruses attack specific cells

Explanation:

Phage typing is based on the fact that bacterial viruses attack specific cells. Phage typing is a method used for detecting single strains of bacteria. It is used to trace the source of outbreaks of infections. 

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

1 2888