Tag Archives: 2008

Write a program in ‘C’ to check whether the given year is leap or not. Also explain the logic of the program. 8m Dec2008

Write a program in ‘C’ to check whether the given year is leap or not. Also explain the logic of the program. 8m Dec2008 The leap year formula is: A leap year is divisable by 4, but not by 100 (except if divisable by 400.)   #include<stdio.h> void main(){ int year; clrscr(); printf(“Enter any year:… Read More »

Write a macro to find out whether the given character is lower case or not 7m Dec2008

Write a macro to find out whether the given character is lower case or not 7m Dec2008 3. (a) Write a macro to find out whether the given character is lower case or not. 7 #include <stdio.h> //#define IS_UPPER_CASE(n) ((n) >= ‘A’ && (n) <= ‘Z’) #define IS_LOWER_CASE(n) ((n) >= ‘a’ && (n) <= ‘z’)… Read More »

Write a loop that calculate sum of the n elements of the series 5m Dec2008

Write a loop that calculate sum of the n elements of the series 5m Dec2008 Write a loop that calculate sum of the n elements of the series: 5 1+ 7 +13 +19 + 25 + ……. Write the loop in 3 different ways: (i) using while loop (ii) using do-while loop   #include<stdio.h> void… Read More »

When can two matrices of order m x n and p x q be multiptied? Also write a program in ‘C’ to multiply two such matrices. 10m Dec2008

When can two matrices of order m x n and p x q be multiptied? Also write a program in ‘C’ to multiply two such matrices. 10m Dec2008   The only condition which makes matrix multiplication possible is n should be equal to p (i.e. n==p) n of m x n Matrix and p of… Read More »

Draw a corresponding flow chart to find the factorial of a given number using recursion. 10m Dec2008

1. (a) Design an algorithm, draw a corresponding flow chart and write a program in ‘C’, to find the factorial of a given number using recursion. 10m Dec2008   Flowchart: Code: #include<stdio.h> void main() { int factorial(); int FACT,NUM; clrscr(); printf(“ENTER NUMBER : “); scanf(“%d”,&NUM); if(NUM>0) { FACT=factorial(NUM); printf(“\nFACTORIAL OF GIVEN NUMBER IS %d “,FACT);… Read More »

Write a program in 8086 assembly Ianguage that converts each character of string to upper case and to the next character 7m Jun2008

Write a program in 8086 assembly Ianguage that accepts a character string, of maximum 10 characters, from the keyboard, converts each character of string to upper case and converts each character to the next character. i.e. A to B, B to C,and so on. Finally display the string on the screen. 7m Jun2008   DATA… Read More »

Explain the working of DVD-ROM with ihe help of block diagram. 4m Jun2008

Explain the working of DVD-ROM with the help of block diagram. 4m Jun2008   CD-ROM and DVD-ROM Optical disks use Laser Disk Technology, which is the latest, and the most promising technology for high capacity secondary storage. The advent of the compact disk digital audio system, a non-erasable optical disk, paved the way for the… Read More »

Explain the operation of a micro programmed control unit with the help of a diagram. 8m Jun2008

Explain the operation of a micro programmed control unit with the help of a diagram. 8m Jun2008   THE MICRO-PROGRAMMED CONTROL The logic of the control unit is specified by a micro-program. A micro-program is also called firmware (midway between the hardware and the software). It consists of: (a) One or more micro-operations to be… Read More »

Draw the state table and the logic circuit for a 3-bit binary counter using D flipflop. 5m Jun2008

Draw the state table and the logic circuit for a 3-bit binary counter using D flipflop. 5m Jun2008 Binary counter A digital circuit which has a clock input and a number of count outputs which give the number of clock cycles. The output may change either on rising or falling clock edges. The circuit may… Read More »

Give block diagram of DMA controller. How does the CPU initialize the DMA transfer? 5m Jun2008

Give block diagram of DMA controller. How does the CPU initialize the DMA transfer? 5m Jun2008 Device Controller A device controller need not necessarily control a single device. It can usually control multiple I/O devices. It comes in the form of an electronic circuit board that plugs directly into the system bus, and there is… Read More »