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

What is the difference between asset management and invest management?

Answer

Investment and asset are really close in meaning. Investment is when you put your money in stock, bond or other financial instruments. Whereas Asset is what you own generally reffered to land, proprietorship , factory, etc.

Report Error

View answer Workspace Report Error Discuss

Subject: Finance

2 2837
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 2836
Q:

What are the three parts of the Nucleotide?

Answer

Nucleotides are the building blocks of the DNA and RNA used as genetic material. Nucleotides also are used for cell signaling and to transport energy throughout cells.


Both deoxyribonucleic acid (DNA) and ribonucleic acid (RNA) are made up of nucleotides which consist of three parts::


1. Nitrogenous Base
2. Pentose Sugar
3. Phosphate Group.

Report Error

View answer Workspace Report Error Discuss

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

6 2836
Q:

Which is India's Largest BPO (Business Process Outsourcing) Company?

A) Piogeon B) Spectramind
C) Technovate D) None of these
 
Answer & Explanation Answer: B) Spectramind

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

12 2832
Q:

Iveco, Part of the Fiat group, holds 15 per cent stake in an Indian automobile company. The  company in the question is 

A) AShok Leyland B) Hindustan Motors
C) Tata Motors D) Eitcher
 
Answer & Explanation Answer: A) AShok Leyland

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Business Awareness

7 2832
Q:

A battlefield always has:

A) Elephants B) Soldiers
C) Arrows D) Chariots
 
Answer & Explanation Answer: C) Arrows

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

2 2831
Q:

How do we now Know the company founded as the Battlecreek Toasted Cornflake Company in 1906?

Answer

Kellogg's

Report Error

View answer Workspace Report Error Discuss

0 2830