Questions

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

Which of the following is not an aerobic outdoor sport?

A) Hiking B) Swimming
C) Skydiving D) Cycling
 
Answer & Explanation Answer: C) Skydiving

Explanation:

Except skydiving all other given options swimming, hiking and cycling are aerobic outdoor sports.

Report Error

View Answer Report Error Discuss

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

3 2870
Q:

You heard me before and then again. Afterward I die until you call me again.

What am I? 

Answer

ECHO.

Report Error

View answer Workspace Report Error Discuss

Subject: Logic Puzzles Exam Prep: CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk , Analyst

10 2870
Q:

Both skin and lung cancer are classified as carcinomas.

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

Carcinomas are cancers that begin in tissues lining the inner or outer surfaces of the body where the DNA of the cells become damaged. Lung cancer and one type of skin cancer (squamous-cell carcinoma) are carcinomas.


 


Hence, the given statement is TRUE.


 

Report Error

View Answer Workspace Report Error Discuss

Subject: General Science
Exam Prep: AIEEE
Job Role: Analyst , Bank PO

2 2870
Q:

Who is appointed as MD and CEO of IDBI Bank in April, 2017 ?

A) Kanungo B) Mahesh Kumar Jain
C) Ravi Chander D) None
 
Answer & Explanation Answer: B) Mahesh Kumar Jain

Explanation:

Mahesh Kumar Jain was appointed as MD and CEO of IDBI bank in April 2017.

Report Error

View Answer Report Error Discuss

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

2 2869
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 2869
Q:

Who is the author of the book 'Panchashati Galpo'?

A) Atin Bandyopadhyay B) Samaresh Basu
C) Moti Nandi D) Buddhadeb Guha
 
Answer & Explanation Answer: A) Atin Bandyopadhyay

Explanation:

The author of the book 'Panchashati Galpo' is Atin Bandyopadhyay or Atin Banerjee. He was a writer of Bengali literature.

Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

3 2868
Q:

Which among the following countries , occupies the largest chunk of the Sunderbans Delta?

A) Bangladesh B) Burma
C) India D) Thailand
 
Answer & Explanation Answer: A) Bangladesh

Explanation:

Sunderbans is the name given to the dense impenetrable  tidal/ mangrove forest of Ganges-Brahmaputra delta because of abundant sundari trees found here.

Report Error

View Answer Report Error Discuss

Filed Under: World Geography

1 2868