Technical Questions

Q:

Write a c program to print multiplication table

Answer

 #include<stdio.h>
int main(){
  int r,i,j,k;
  printf("Enter the number range: ");
  scanf("%d",&r);
  for(i=1;i<=r;i++){
      for(j=1;j<=10;j++)
           printf("%d*%d=%d ",i,j,i*j);
      printf("\n");
  }
  return 0;
}

Sample Output:
Enter the number range: 5

1*1=1 1*2=2 1*3=3 1*4=4 1*5=5 1*6=6 1*7=7 1*8=8 1*9=9 1*10=10
2*1=2 2*2=4 2*3=6 2*4=8 2*5=10 2*6=12 2*7=14 2*8=16 2*9=18 2*10=20
3*1=3 3*2=6 3*3=9 3*4=12 3*5=15 3*6=18 3*7=21 3*8=24 3*9=27 3*10=30
4*1=4 4*2=8 4*3=12 4*4=16 4*5=20 4*6=24 4*7=28 4*8=32 4*9=36 4*10=40
5*1=5 5*2=10 5*3=15 5*4=20 5*5=25 5*6=30 5*7=35 5*8=40 5*9=45 5*10=50

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2194
Q:

Point out the error, if any, in the following program.

main()

{

    int a = 10;

    void f();

    a = f();

    printf ( "\n %d", a );

}

void f()

{

    printf ( "\n Hi ");

}

Answer

In spite of defining the function f() as returning void, the program is trying to collect the value returned by f() in the variable a.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2184
Q:

What is program counter in 8085?

Answer

Program counter holds the address of either the first byte of the next instruction to be fetched for exectuion or the address of the next byte of a multi byte instruction, which has not beeb completely fetched. in both the cases it gets increnented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2178
Q:

Will the following function work?

f1 ( int a, int b )

{

    return ( f2 (20) );

}

f2 ( int a )

{

    return ( a * a );

}

Answer

Yes

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2176
Q:

What would be the output of the following program assuming that the array beigns at location 1002?

main()

{

   int a[3][4] = {

                            1 , 2 , 3 , 4

                            5,  6 , 7, 8

                            9, 10 , 11, 12

                       };

    Printf ("\n%u %u %u", a[0] + 1, *( a[0] + 1), *( *(a + 0) + 1) );

}

Answer

1004  2  2

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 2174
Q:

What is LATCH?

Answer

Latch is a D-type flip-flop used as a temporary tsorage device controlled by a tiing singnal, which can store 0 or 1. the primary function of a Latch is data storage. It is used in output devices such as LED, to hold the data for display.


To Store Monitor programs.

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2172
Q:

Which Stack is used in 8085?

Answer

LIFO (Last In First Out) stack is used in 8085. In this type of Stack the last stord information can be retrieved first

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2159
Q:

Write an RTL Description for D latch and D flip flop?

Answer

For D latch: always@(enable) q<=d;


For D flip flop: always@(opsedge clock) q<=d; 

Report Error

View answer Workspace Report Error Discuss

Subject: Hardware

0 2153