What is a difference between register and a memory location?
difference between register and memory location
What is the advantage of direct implementation?
Direct coupling provides good frequency response and also very good DC amplification.It is simple to implement.
What is the number of nodes in a complete binary tree of level 5?
If the number of levels is L, the maximum number of nodes N in a binary tree is N = 2L-1.
For L = 5, N equates to 31 thus.
What is the difference between algorithm and pseudocode in computer science?
Pseudocode consists of short readable and formally-styled natural language used to explain specific tasks within a program's algorithm while an Algorithm is a set of instructions used to solve a particular problem.
What is a short formal document?
A short formal document should be structured with headlines or headings, to be followed by the concise and comprehensive content to indicate the theme or the mainpoints of your document A short formal document can be lots of different types of documents. A letter being one of them
How would you dynamically allocate a one-dimensional and two-dimensional array of integers?
To dynamically allocate an array, use 'void *realloc(void *array, size_t size)', where array is the pointer you plan on reallocating and size is the new length of the array in bytes.
One-dimensional array:
{
int len = 10;
int *array = NULL;
array = (int*)realloc(array, len * sizeof(int));
}
Two-dimensional array:
{
int xlen = 10;
int ylen = 10;
int **array2d = NULL;
array2d = (int**)realloc(array2d, xlen * sizeof(int*));
/* After reallocating array2d, do the same to its contents. */
int index;
for (index = 0; index < xlen; index++) {
array2d[index] = (int*)realloc(array2d[index], ylen * sizeof(int));
}
array2d[5][5] = 24;
/* Clean up. */
for (index = 0; index < xlen; index++) {
free(array2d[index]);
}
free(array2d);
return 0;
}
What are the Advantages of linked list over stack and queue?
A linked list is a data structure in which each node has a pointer to the next node, and thus the whole list is linked.
Some advantages are:
* Easy traversal of the whole list (simply follow the pointers) * Easy insertion and deletion of nodes (don't need to move all the other nodes around)
Need for header node in linked list?
The utility of a header node in a linked list is to simplify the functions of adding and deleting elements in the list. If you have a pointer in memory that points to the first element, then you need to pass the address of that pointer, rather than the value of that pointer, to the routines for list manipulation, because that pointer would need to change if an element were added or deleted at the head of the list. If that pointer, however, points to a special element in the list which is actually the pointer to the head of the list, then you do not need to pass the address of the pointer - you can pass its value, and it will never change. This technique "wastes" the data portion of that first element.
What is data that has been processed called?
Actually, Processed data that conveys meaning and is useful to people is called INFORMATION, not output.
Response: Maybe true, but the answer to the question given is OUTPUT!
On the basis of modular programming(moduler programming can b used to break up a large program in2 manageable units) the program is designed in top-down approach. As we go towards bottom, the task become simpler ans easy.....
Where can one find game programming software?
For the programming part its usually Visual Studio c++ or C# depending on what programming language you want to use.
For the art side of games, software such as Maya, 3ds Max, XSI are used for the 3d models and animation.
Photoshop is usually used for the textures.
And some sort of level editor such as Hammer, Radiant, Sandbox, UnrealEd, ect.
Can arrays be created dynamically?
Yes, arrays can be created dynamically. The following shows how it can be done in C:
void f (unsigned n) {
int* p = malloc (n * sizeof (int)); /* allocate memory to accommodate n integers */
/* use p... */
free (p);
p = 0;
}
What is the difference between dijkstra and kruskal's algorithm?
Both of these functions solve the single source shortest path problem. The primary difference in the function of the two algorithms is that Dijkstra's algorithm cannont handle negative edge weights. Bellman-Ford's algorithm can handle some edges with negative weight. It must be remembered, however, that if there is a negative cycle there is no shortest path.
What will happen if you restart your computer?
New Computers Reaction: Nothing, it will just restart your system again.
Old or Present Computers Reaction: Nothing, or sometimes it say an error but you have to play with it like try out the options they offer in the error state. but soon it will turn out okay.
Short int and long integers have how many bytes in C programming?
It depends on the programming language, the compiler, and the machine architecture.
In C, the size of short int and int is not mandated by the language. Often, on 32-bit machines, 'int' will be 32-bit, while 'short int' may be 16-bit. But the only thing the language promises is that short int will be no larger than int.
What does backslash mean in programming?
In computing, the backslash character \ has many different uses. Aside from being the file path separator character on Windows-based operating systems, the backslash most commonly is used as an escape character. An escape character is one that alters the meaning of the character which follows it:
What is difference in use between interfaces and abstract classes in java?
While neither abstract classes nor interfaces can be instantiated in Java, you can implement methods in abstract classes. Interfaces can only define methods; no code beyond a method header is allowed.
How can you find out a hacker?
Often more than not the term, "hacker" is used to describe someone that uses computers to break computers or deploy attacks on computer systems. The correct term is "cracker".
A hacker is a person that always asks themselves how something works and then figures it out.
To become a hacker you have to find a project where technology does not exist to make things work the way you want them to then use your smarts to find an answer.
Hacker = Inventor of things on top of things already invented.
or else you can say a solutionfinder for silly solutions t
What character is used in an OR operator?
The logical OR operator in C and Java is the double vertical bar ().
Example: if (s 0) do something
The operator applies a logical OR operator when it evaluates the expression.
What is the artificial language designed to communicate instruction to a computer?
The type of computer language you are referring to are called high-level languages. High-level programming languages are very abstract and allow humans to better understand the source code by writing it in a human-readable fashion. Below is an example of a snippet of C++ code, which is a high-level language.
int n1 = 1;
Anyone can tell what this does just by looking at it. This statement declares an integer variable with the name n1 and initializes it with a value of 1.
Write a program in C to find the factoial of 5?
/* gcc -ansi -Wall -Wextra -pedantic -s -static 0.c -o 0 */
#include <stdio.h>
int main ( )
{
int n = 5 , factorial = 1 ;
while ( n != 0 )
{
factorial *= n ;
n -- ;
}
printf ( "%i\n" , factorial ) ;
return 0;
}
It is an algorithm used by another algorithm as part of the second algorithm's operation.
As an example, an algorithm for finding the median value in a list of numbers might include sorting the numbers as a sub-algorithm: There are plenty of algorithms for sorting, and the specifics of the sorting does not matter to the "median value" algorithm, only that the numbers are sorted when the sub-algorithm is done.
For what an algorithm is, see related link.
What is the difference between extern and global?
Extern and Global are the storage space in C program.
Global provides us to access the variables from anywhere inside the program only whereas Extern provides us to access the variables from outside that program, i,e., some other program.
Why do you use a void pointer in a programme?
void is type of pointer that usually means that you can make it point to any data type.
When you make a pointer point to somewhere its data type should match with the place where you want it to point.
When you dont know the data type where it will point to then you can declare a void pointer and make it point to the data type it want.
Types of array in data structures?
There are many types of trees:
- binary trees
- binary search trees
- B+ trees
- red-black trees
- AVL trees
- suffix trees
- and much more....
Each have different rules for adding a new element, removing an element, and searching for an element in the tree. Consequently, they all have different advantages and disadvantages.