answersLogoWhite

0

📱

Computer Science

Computer Science is the systematic study of algorithmic processes that describe and transform information. It includes the theoretical foundations of information and computation and the practical techniques of applying those foundations to computer systems. Among the many subfields of Computer Science are computer graphics, computer programming, computational complexity theory, and human-computer interaction. Questions about Computer Science, terms such as algorithms and proofs, and methodologies are encouraged in this category.

1,839 Questions

Find an example or a recursive procedure and represent it as an iterative procedure?

int recursiveNFactorial (int n) {

if (n < 2) return 1;

if (n == 2) return n;

else return n * recursiveNFactorial (n - 1);

}

int iterativeNFactorial (int n) {

int result = 2;

if (n < 2) return 1;

while (n > 2) result *= n--;

return result;

}

What are numelts in c language?

There are no "numelts" in C language. (Whatever they are.)

What is the importance of analysis in the design of an algorithm?

There are two main reasons we analyze an algorithm: correctness and efficiency.

By far the most important reason to analyze an algorithm is to make sure it will correctly solve your problem. If our algorithm doesn't work, nothing else matters. So we must analyze it to prove that it will always work as expected.

We must also look at the efficiency of our algorithm. If it solves our problem, but does so in O(nn) time (or space!), then we should probably look at a redesign.

What is the definition of a co-buchi automaton?

A co-buchi automaton is defined similarly to a buchi one: A = .
The acceptance condition of a co-Buchi automaton is: for an infinite word w, w is in L(A) (A's language) iff there is a run of A on w that stays in F. "Stays", in formal terms means that for an infinite run r=r1 r2 ... there is a number n such that for every m>n rm is in F.

What is distributed system?

A distributed system is collection of indendent computers that appears to its users as a single coherent system. BY arvind yadav 0612613015 INDIA.

What is the basic unit of information in computing and telecommunications?

The basic unit of information in computing and telecommunications in called the octet, otherwise known as a 8 bit byte.

What is the difference between Compressing and Archiving?

Compression is used to make something smaller. Archiving is used for long term storage of something that's not often used anymore.

What are scalar and vector instructions?

Scalar instructions are those instructions which requires single datas or operands to process. and vector processors are those which requires series/ array of data to process................... By Er.Neeraj Kumar Maurya profnrjmaurya@gmail.com, 09225869039

What are computer procedures and what is it used for?

Procedure can mean either of 2 things: a short piece of code (subprogram) within a program or operating instructions.

  1. subprogram, a piece of code that can be called by the main program's code as needed to perform a specific operation.
  2. operating instructions, used by a human operator to correctly perform a task i.e. running a specific program.

What is the meaning of the term busy waiting What other kinds of waiting are there in an operating system Can busy waiting be avoided altogether Explain your answer?

_ A process is waiting for an event to occur and it does so by executing instructions. _ A process is waiting for an event to occur in some waiting queue (e.g., I/O, semaphore) and it does so without having the CPU assigned to it. _ Busy waiting cannot be avoided altogether.

What is one pass macro processor in microprocessor?

A macro processor is software. Usually a part of a compiler or an assembler, used to program a computer.

A microprocessor is hardware, one type of computer implementation.

Very different things.

The macro processor was first created in the 1950s and was used on large vacuum tube mainframe computers (long before the first microprocessor).

What assembler do for system?

An assembler takes abbreviated names for computer instructions, like "MOV", and turns them into the numeric bytes which, when loaded into memory, can be executed by the CPU.

What interface does the user use to key in commands?

Generally the keyboard. The mouse can also be used if the commands are click-able buttons in a GUI environment.

What are the applications of linked list?

1.Sparse matrix representation 2. polynomial manipulation 3.dyanamic memory storage 4.in symbol table

Sort the following numbers 19 5 28 2 7 using bubble sort?

Passes:

bold are "sunk" into place

1: 5 19 2 7 28

2: 5 2 7 19 28

3: 2 5 7 19 28

4*: 2 5 7 19 28

*The last pass had no swaps, thus it breaks out of the sort

Efficiency: O(n^2) in random order O(n) when already sorted

What port does BOOTPS use?

The BOOTP protocol uses multiple protocols, starting with port 67.

What is the difference between fseek and lseek?

lseek is a system call, but fseek is a C function belonging to the ANSI C standard library, and included in the file stdio.h

lseek uses file descriptor (return by open system call), but fseek uses pointer to FILE structure (return by fopen ANSI C library function) (though file desctor and FILE * can be used interchangeably several times).

System calls are to communicate directly with an operating system. Generally, system calls are slower than normal function calls.

Explain the Computer Information Systems vs Computer Science majors?

It largely depends on the university, but typically IS is a business major and CS is an engineering major. Not only will IS and CS have different requirements, so will the school of business versus the school of engineering. IS graduates typically find work in the network administration field while computer science graduates work in software development. These are broad statements though and may not be true of individual schools or graduates.

Is distributed system is loosely coupled or tightly coupled?

It can be either or even both - depends on how the designer(s) designed the distributed systems

Why the computer only understand the language of o and 1?

In computer programming, 1 is the presence of voltage, 0 is the lack of voltage. Thus, 1 is "on" and 0 is "off." In the interest of compacting more information into smaller spaces, bi-polar representations emerged. In a bi-polar format, a -1 is also considered "on." Since there can be no condition except presence of, or lack of voltage, then using symbols such as 20 will not work.

And, I'm not a whiz at computer components, but I believe it is the math processor (CPU) that determines the values of "on" or "off" and compiles the bits into bytes which it then compares to pre-determined responses.

Assembler design options?

Two main options for the design of assembler are:

1. One pass assembler

2. Multi-pass assembler

One pass assemblers generally have problem of "forward referencing" which is resolved by using mulitpasses