Friday, February 28, 2025

Digital Circuit

 1. Basic Gates 

2. Arithmetic circuit

3. Decoder 

4. Encoder

5.Multiplexer

6. Demultiplexer

7. Flip flop and Latch - CLICK

8. counter - CLICK

9. Register  - CLICK

10.Sequential circuit  -CLICK





Tuesday, February 25, 2025

JECA 2025 QUESTION PRACTICE SET 1

 JECA 2025 QUESTION PRACTICE SET 1

Question 1:

Which disk scheduling algorithm is designed to reduce the total seek time by choosing the request that is closest to the current disk head position?

A) FCFS (First-Come, First-Served)
B) SSTF (Shortest Seek Time First)
C) SCAN
D) LOOK

Question 2:

In which of the following disk scheduling algorithms does the disk arm move from one end to the other and then reverse the direction?

A) FCFS
B) SCAN
C) C-SCAN
D) LOOK



Question 3:

Which of the following disk scheduling algorithms always moves the disk arm in a single direction?

A) FCFS
B) SCAN
C) C-SCAN
D) SSTF



Question 4:

What is the primary disadvantage of the First-Come, First-Served (FCFS) disk scheduling algorithm?

A) It can lead to high disk seek times
B) It does not guarantee fairness
C) It prioritizes critical requests
D) It causes disk head starvation

Question 5:

Which disk scheduling algorithm suffers from the problem of "starvation," where some requests may never be serviced?

A) SSTF (Shortest Seek Time First)
B) FCFS
C) SCAN
D) C-SCAN



Question 6:

Which of the following disk scheduling algorithms is most likely to cause starvation for requests far away from the current disk head position?

A) SCAN
B) LOOK
C) SSTF
D) C-SCAN



Question 7:

In the LOOK disk scheduling algorithm, the disk arm:

A) Always goes to the furthest request in one direction and then reverses
B) Moves back and forth like in SCAN but stops when there are no more requests in that direction
C) Moves only in one direction, regardless of the position of the requests
D) Chooses the request that is farthest from the current head position

Question 8:

Which disk scheduling algorithm is used in situations where the disk arm only services requests in one direction and, when reaching the end, jumps back to the starting position to continue servicing?

A) C-SCAN
B) LOOK
C) FCFS
D) SCAN

Question 9:

Which of the following disk scheduling algorithms is a modified version of SCAN where the disk arm always moves in a single direction?

A) SSTF
B) LOOK
C) C-SCAN
D) FCFS


Question 10:

Given the request queue:
Request Queue: 140, 90, 15, 200, 60, 45, 30, 180
The initial head position is at 100. Using FCFS (First-Come, First-Served) algorithm, what is the total head movement?

A) 650
B) 675
C) 720
D) 700


Question 11:

Given the request queue:
Request Queue: 140, 90, 15, 200, 60, 45, 30, 180
The initial head position is at 100. Using SSTF (Shortest Seek Time First) algorithm, what is the total head movement?

A) 350
B) 330
C) 400
D) 380



Question 12:

Consider the request queue:
Request Queue: 140, 90, 15, 200, 60, 45, 30, 180
The initial head position is at 100. Use the SCAN algorithm, and the head initially moves toward the higher numbered tracks. What is the total head movement?

A) 500
B) 450
C) 520
D) 480



Question 13:

For the request queue:
Request Queue: 140, 90, 15, 200, 60, 45, 30, 180
The initial head position is at 100. Using C-SCAN, what is the total head movement?

A) 760
B) 800
C) 780
D) 850



Question 14:

For the request queue:
Request Queue: 140, 90, 15, 200, 60, 45, 30, 180
The initial head position is at 100. Using LOOK, what is the total head movement if the head initially moves toward the lower numbered tracks?

A) 520
B) 530
C) 550
D) 570

Question 15:

Given the request queue:
Request Queue: 200, 130, 50, 80, 170, 60, 120, 150
The initial head position is at 100. Using C-LOOK, what is the total head movement?

A) 780
B) 750
C) 820
D) 770


Question 16:

Which command is used to display the current working directory in UNIX?

A) pwd
B) cd
C) ls
D) dir



Question 17:

Which command is used to change the directory in UNIX?

A) move
B) chdir
C) cd
D) dir

Question 18:

Which command in UNIX is used to list all files and directories in the current directory?

A) list
B) ls
C) dir
D) show

Question 19:

What does the command rm -r do in UNIX?

A) Removes a single file
B) Removes a directory and its contents
C) Renames a file
D) Creates a new directory



Question 20:

Which command is used to view the contents of a file in UNIX?

A) show
B) open
C) cat
D) view

Question 21:

Which command is used to display the last part of a file in UNIX?

A) head
B) tail
C) cat
D) more

Question 22:

Which command is used to find files in UNIX?

A) search
B) find
C) locate
D) grep

Question 23:

Which command is used to create a new directory in UNIX?

A) newdir
B) mkdir
C) create
D) makedir

Question 24:

Which of the following commands is used to change the file permissions in UNIX?

A) chmod
B) chown
C) setperm
D) modify



Question 25:

Which command is used to display the manual page of a command in UNIX?

A) man
B) help
C) guide
D) doc

Question 26:

Which command is used to remove a file in UNIX?

A) delete
B) remove
C) rm
D) del

Question 27:

Which command is used to count the number of lines, words, and characters in a file?

A) count
B) wc
C) lines
D) stat



Question 28:

Which command is used to display the disk usage of directories in UNIX?

A) diskusage
B) du
C) df
D) size



Question 29:

What does the command chmod 755 file.txt do?

A) Grants read and write permissions to the owner and read-only permissions to others
B) Grants full permissions to the owner and read and execute permissions to others
C) Grants full permissions to everyone
D) Removes all permissions from the owner



Question 30:

Which command is used to send a signal to a process in UNIX?

A) kill
B) terminate
C) exit
D) stop

Question 31:

Which command is used to display the current date and time in UNIX?

A) time
B) date
C) datetime
D) now



Question 32:

Which command is used to display all currently running processes in UNIX?

A) ps
B) jobs
C) process
D) tasklist



Question 33:

Which command is used to concatenate and display files in UNIX?

A) cat
B) concat
C) combine
D) join

Question 34:

Which command is used to view and search for patterns in files in UNIX?

A) search
B) grep
C) find
D) scan

Question 35:

Which command in UNIX is used to compress files?

A) zip
B) compress
C) tar
D) gzip

Question 36:

What will be the output of the following C program?

#include <stdio.h>
void main() {
    int i = 0;
    if(i++ == 0)
        printf("Hello ");
    else
        printf("World ");
}

A) Hello
B) World
C) Hello World
D) None

Question 37:

What is the result of the following C code?

int x = 5;
int y = 2;
x = x / y * y;
printf("%d", x);

A) 1
B) 2
C) 5
D) 0



Question 38:

What does the following C code print?

int x = 5;
int y = 10;
x = ++x + y++;
printf("%d %d", x, y);

A) 16 11
B) 15 11
C) 16 10
D) 15 10



Question 39:

What will be the output of this program?

#include <stdio.h>
void main() {
    int x = 1, y = 1;
    if(x++ == ++y)
        printf("Match");
    else
        printf("No Match");
}

A) Match
B) No Match
C) Compile-time error
D) Undefined behavior

Question 40:

Which of the following statements is TRUE about a union in C?

A) The members of a union share the same memory location.
B) The size of a union is the sum of the sizes of its members.
C) A union can have only one member at a time.
D) None of the above

Question 41:

What is the output of the following C program?

#include <stdio.h>
void main() {
    int i = 0;
    printf("%d ", i++);
    printf("%d ", i);
}

A) 0 1
B) 1 1
C) 1 2
D) 0 2

Question 42:

What will be the result of the following C code?

int x = 2, y = 3;
x = x ^ y;
y = x ^ y;
x = x ^ y;
printf("%d %d", x, y);

A) 2 3
B) 3 2
C) 0 0
D) Undefined behavior



Question 43:

What is the output of this program?

#include <stdio.h>
void main() {
    int arr[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
    printf("%d", *(*(arr + 1) + 1));
}

A) 4
B) 5
C) 6
D) 8

Question 44:

Which of the following statements about function pointers in C is TRUE?

A) Function pointers can point to functions with different signatures.
B) Function pointers are not allowed to be used in C.
C) A function pointer is declared using the syntax type *function_name();.
D) A function pointer stores the memory address of a variable.



Question 45

What does the following C program print?

#include <stdio.h>
void foo(int x) {
    if(x < 5) {
        x++;
        foo(x);
    }
    printf("%d ", x);
}
void main() {
    foo(0);
}

A) 1 2 3 4 5
B) 5 4 3 2 1
C) 1 2 3 4
D) 5 4 3 2

Question 46:

What is the correct syntax to declare a pointer to a function in C?

A) int *func(int x);
B) int (*func)(int x);
C) int func*(int x);
D) int *func(int x, int y);

Question 47:

What does the following program output?

#include <stdio.h>
void main() {
    int i = 10;
    while(i--) {
        printf("%d ", i);
    }
}

A) 9 8 7 6 5 4 3 2 1 0
B) 10 9 8 7 6 5 4 3 2 1
C) 9 8 7 6 5 4 3 2 1
D) Compile-time error

Question 48:

What will be the output of the following C code?

int x = 10;
int *ptr = &x;
(*ptr)++;
printf("%d", x);

A) 9
B) 10
C) 11
D) Undefined behavior



Question 49:

What is the output of the following code?

#include <stdio.h>
void main() {
    int a = 10;
    int b = 20;
    if(a = b) 
        printf("Match");
    else
        printf("No Match");
}

A) Match
B) No Match
C) Compile-time error
D) Undefined behavior



Question 50:

Which of the following is true about the sizeof operator in C?

A) It can be used with any variable type, including arrays and structures.
B) It is evaluated at runtime.
C) It can be used only with primitive data types.
D) It returns the size of a pointer to the type.



Question 51:

Which of the following is a correct declaration for a constant pointer to a constant integer in C?

A) int *const const_ptr;
B) const int *const const_ptr;
C) const int *const_ptr;
D) int const *const_ptr;



Question 52:

Which of the following functions in C can cause undefined behavior when used incorrectly?

A) malloc()
B) free()
C) strlen()
D) printf()



Question 53:

What is the output of the following code?

#include <stdio.h>
int main() {
    char *str = "Hello, World!";
    printf("%c", *(str + 7));
    return 0;
}

A) H
B) W
C) l
D) o

Question 54:

What will be the output of the following program?

#include <stdio.h>
int main() {
    int x = 0;
    switch(x) {
        case 0:
            printf("Zero");
            break;
        case 1:
            printf("One");
            break;
        default:
            printf("Default");
    }
    return 0;
}

A) Zero
B) One
C) Default
D) Compile-time error

Question 55:

What will be the output of the following code?

#include <stdio.h>
void main() {
    int i = 5;
    int *ptr = &i;
    printf("%d", ++*ptr);
}

A) 5
B) 6
C) 4
D) Undefined behavior




Friday, February 21, 2025

COMPUTER SCIENCE MDC SAMPLE MCQ

 

Shortcut key: Copy , Cut , Paste ,Undo ,Save , Print ,Select all ,create a new file, open a file

Full form: WWW,URL,LAN,MAN,WAN,ISP,IP,MBPS,EMAIL,HTTP,FTP,SMTP,HTTPS,AI,VIRUS.



What is smallest unit of the information?

  1. A bit
  2. A byte
  3. A block
  4. A nibble
What is the decimal equivalent of the binary number 10111?
  1. 21
  2. 39
  3. 42
  4. 23

Which of the following values is the correct value of this hexadecimal code 1F.01B?

  1. 35.0065918
  2. 32.0065918
  3. 31.0065918
  4. 30.0065918

 How is the data stored on the diskette?

  1. Ink
  2. Laser bubbles
  3. Magnetism
  4. Circuits

 Which of the following is the smallest visual element on a video monitor?

  1. Character
  2. Pixel
  3. Byte
  4. Bit

Which of the following is an output device?

  1. Keyboard
  2. Mouse
  3. Light pen
  4. VDU

Which of the following is an input device?

  1. Plotter
  2. Printer
  3. VDU
  4. Mouse

Which of the following is the extension of Notepad?

  1. .txt
  2. .xls
  3. .ppt
  4. .bmp

What is the mean of the Booting in the system?

  1. Restarting computer
  2. Install the program
  3. To scan
  4. To turn off

The central processing unit is located in the _____.

  1. Hard disk
  2. System unit
  3. Memory unit
  4. Monitor

Which one of the following groups contains graphical file extensions?

  1. JPG, CPX, GCM
  2. GIF, TCE, WMF
  3. TCP, JPG, BMP
  4. JPG, GIF, BMP

Which of the following is equal to a gigabyte?

  1. 1024 bytes
  2. 512 GB
  3. 1024 megabytes
  4. 1024 bits

Which type of program acts as an intermediary between a user of a computer and the computer hardware?

  1. Operating system
  2. User thread
  3. Superuser thread
  4. Application program

What kind of language can computer understand?

  1. Normal language
  2. Computer language
  3. Assembly language
  4. High-level language



What is the full form of RAM?

  1. Remote Access Memory
  2. Random Access Memory
  3. Remote Access Memory
  4. Random Access Memory

Which one of the following software applications would be the most appropriate for performing numerical and statistical calculations?

  1. Database
  2. Document processor
  3. Graphics package
  4. Spreadsheet

 Which of the following is not considered hardware?

  1. Operating system
  2. CPU
  3. Keyboard
  4. Hard disk

What is the full form of USB?

  1. Unshielded System Board
  2. Universal System Board
  3. Unidentified System Bus
  4. Universal System Bus

What is five main components of a computer system?

  1. CPU, CD-ROM, Mouse, Keyboard, Sound card
  2. Memory, Video card, Monitor, Software, Hardware
  3. Modem, Keyboard, Word Processor, Printer, Screen
  4. CPU, Memory, System bus, Input, Output

Which of the following numbers is a binary number?

  1. 1 and 2
  2. 0 and 0.1
  3. 2 and 0
  4. 0 and 1

Which one of the following is an example of the browser software?

  1. Microsoft Word
  2. Notepad
  3. Internet navigator
  4. Internet explorer

A spreadsheet is the best application for ____________.

  1. Writing an information
  2. Handling simple accounts
  3. Producing a grid-referenced map
  4. Keeping an inventory of equipment used

What is the full form of VDU?

  1. Virtual Development User
  2. Virtual Detection Unit
  3. Visual Detection Unit
  4. Visual Display Unit

Which one of the following parts is called the brain of the computer?

  1. ALU
  2. Monitor
  3. UPS
  4. CPU

Which of the following device is not a portable device?

  1. DVD
  2. Mobile phone
  3. Pen drive
  4. None of the these

Thursday, February 20, 2025

MDC SEMESTER 3 THEORY AND PRACTICAL ASSIGNMENTS

 THEORY SET -1


1. 5 Input  Device and 5 Output Device Name.

2. Describe different types of printers.

3. Describe the classification of computer.

4. Write a short note on i) primary memory ii) secondary memory

5. Why cache memory is used?

6. Describe features of analog computer ,digital computer and hybrid computer.

7.Write a short note E-Mail.

8.What do you mean by data transfer rate?

9.Write a short note on i)LAN ii) MAN iii)WAN iv)CAN v) PAN

10. What do you mean by search engine?


                                                        THEORY SET -2


1. Evolution of Operating System

2. Short note on -Batch Processing, Time Sharing, Multi-programming, Multi-Processing

3.setting date and time

4. Describe the basic features of i) Artificial Intelligence, ii) Robotics, iii) Internet of Things (IoT),  iv) Smart cities, v)Cloud Computing vi) antivirus 

5. Describe different types of computer virus.

6. Shortcut key: Copy , Cut , Paste ,Undo ,Save , Print ,Select all ,create a new file, open a file

7. Full form: WWW,URL,LAN,MAN,WAN,ISP,IP,MBPS,EMAIL,HTTP,FTP,SMTP,HTTPS.

                                                       PRACTICAL 


1. MS-WORD -  i) Class Routine

                           ii) BIO-DATA

2. MS-EXCEL - i)Create the table, insert appropriate data and then calculate sum of total marks, average of marks, highest marks, lowest marks of every student.



3. MS-POWER POINT  i) Cyber Security

                                          ii) Artificial Intelligence

                                         










MDC SEMESTER 1 THEORY AND PRACTICAL ASSIGNMENTS

THEORY SET -1


1. 5 Input  Device and 5 Output Device Name.

2. Describe different types of printers.

3. Describe the classification of computer.

4. Write a short note on i) primary memory ii) secondary memory

5. Why cache memory is used?

6. Describe features of analog computer ,digital computer and hybrid computer.

7.Write a short note E-Mail.

8.What do you mean by data transfer rate?

9.Write a short note on i)LAN ii) MAN iii)WAN iv)CAN v) PAN

10. What do you mean by search engine?


                                                        THEORY SET -2


1. Evolution of Operating System

2. Short note on -Batch Processing, Time Sharing, Multi-programming, Multi-Processing

3.setting date and time

4. Describe the basic features of i) Artificial Intelligence, ii) Robotics, iii) Internet of Things (IoT),  iv) Smart cities, v)Cloud Computing vi) antivirus 

5. Describe different types of computer virus.

6. Shortcut key: Copy , Cut , Paste ,Undo ,Save , Print ,Select all ,create a new file, open a file

7. Full form: WWW,URL,LAN,MAN,WAN,ISP,IP,MBPS,EMAIL,HTTP,FTP,SMTP,HTTPS.

                                                       PRACTICAL 


1. MS-WORD -  i) Class Routine

                           ii) BIO-DATA

2. MS-EXCEL - i)Create the table, insert appropriate data and then calculate sum of total marks, average of marks, highest marks, lowest marks of every student.



3. MS-POWER POINT  i) Cyber Security

                                          ii) Artificial Intelligence

                                         










Saturday, November 16, 2024

string pointer

 


#include <stdio.h>


int main()

{

    char a[]="aeiou";

    char *p;

    p=a;

    printf("%c\n",++*p);

    puts(a);


    return 0;

}

string pointer

 #include <stdio.h>


int main()

{

    char a[]="aeiou";

    char *p;

    p=a;

    printf("%c\n",(*p)++);

    puts(a);


    return 0;

}

string pointer

 #include <stdio.h>


int main()

{

    char a[]="aeiou";

    char *p;

    p=a;

    printf("%c",*p++);

    puts(a);


    return 0;

}

Saturday, November 9, 2024

POINTER

 int main()

{

    char a[]="aeiou";

    char *p;

    p=a;

    printf("%c",*p);


    return 0;

}

POINTER

 

int main()

{

    int a[]={10,20,30,40};

    int *p,i;

    p=a;

    printf("%d ",*a+1);

    printf("%d ",*p);

 

    //for(i=0;i<4;i++)

      //printf("%d ",a[i]);

    return 0;

}