Technical Questions

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

What is the disadvantage of microprocessor?

Answer

1.Limitations on the size of data. 


2.Most Microprocessors does not support floating-point operations. 


3.Over heating physically


4. Not bit addressable

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2433
Q:

What would be the output of the following program?

main()

{

     char ch ='A';

      printf ("%d%d", sizeof (ch), sizeof ('A'));

}

Answer

1   2

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2422
Q:

What are the basic expansion card types?

Answer

The basic expansion card types in A+ Hardware certification are ISA and PCI, ISA these can be used only on XT, AT and ATX boards. The industry now considers ISA obsolate.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2413
Q:

Differentiate between a.) Testing and Debugging b.) Two tier and Three tier architecture c.) Alpha testing and Beta testing d.) Static testing and dynamic testing

Answer

a.) Testing and Debugging 


Testing is process of verifying if the application matches requirements and reporting bugs; Testing is usually done by an independent testing team while debugging is a process of finding and fixing bugs with the intention of reducing bugs; Debugging is usually done by the programmer.


 


b.) Two tier and Three tier architecture


In a two tier architecture there is a data server and a client application. Client application directly accesses the server data. In a three tier architecture there is a data server, a client application and a server application. Client application calls the server application which in turn fetches data from the data server and returns back to client application.


 


c.) Alpha testing and Beta testing


Alpha testing is conducting acceptance testing in the environment where the application was developed. It is done by the customer. Beta testing is conducting acceptance testing is the customer environment. It is done by the group of customers or users who will actually be using it.


 


d.) Static testing and dynamic testing


Static testing is checking the application without actually running the application whereas dynamic testing checks the application by running it.

Report Error

View answer Workspace Report Error Discuss

Subject: Software Testing

3 2391
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 2379
Q:

What is Proxy ARP?

Answer

It is using a router to answer ARP requests. This will be done when the originating host believes that a destination is local, when in fact is lies beyond router.

Report Error

View answer Workspace Report Error Discuss

Subject: Networking
Job Role: Database Administration

1 2375