answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

How many bits to represent twenty-six?

23 can be represented in binary as 10111 and would therefore require 5 bits to represent.

What is poiner value in c?

In c a pointer is a variable that points to or references a memory location in which data is stored. Each memory cell in the computer has an address that can be used to access that location so a pointer variable points to a memory location we can access and change the contents of this memory location via the pointer.

Pointer declaration

A pointer is a variable that contains the memory location of another variable. The syntax is as shown below. You start by specifying the type of data stored in the location identified by the pointer. The asterisk tells the compiler that you are creating a pointer variable. Finally you give the name of the variable. type * variable name Example: int *ptr; float *string;

What is fluent?

When you can speak a language propely, with good tempo and clarity. Something you clearly lack at this stage.

Define list of operation on stack?

There are 4 main widely used stack operations.

Operations:

* POP - increase stack pointer and return top element * PUSH - putting element into stack's top * TOP - returns data of top element on stack * LENGTH/SIZE - returns number of elements inside stack For more detailed implementation details, please check web links.

Narrate instances of Diwan Kaura Mal helping the Sikhs?

HE USED TO PAYRANSOM TO BUY PEACE AND FRIENDSHIP BETWEEN SIKHS AND MUSLIMS

HE WAS STOPPING SIKH SANGAT NOT TO GO DARBAR SAHIB ON DIWALI BECAUSE

DIWAN LAKHPAT RAI HAD ORDERED THAT ANY SIKH GOING TO DARBAR SAHIB WILL BE KILLED

IN THIS WAY HE WAS TRYING TO HELP SIKHS TO SAVE THIER LIVES

What is the difference between Regula-falsi method and secant method?

Regula-Falsi Method evaluates using assumed variables like "a", "b", f(a), f(b)

Secant Method Directly works with x1, x2, f(x1), f(x2)

Difference is in the Assignment pattern only, otherwise both are used to find root of Non-Linear equations using the same procedure which is:

x1= [a * f(b) - b * f(a)]/[f(b)-f(a)]

x1= [x0 * f(x1) - x1 * f(x0)]/[f(x1)-f(x0)]

Thank You :-)

The advantages and disadvantages of top down approach and bottom up approach?

Bottom-up approach

1.User and business awareness of the product. Benefits are realized in the early phases.

2.You can replace many manual processes with early automation.

3.You can implement password management for a large number of users.

4.You do not have to develop custom adapters in the early phases.

5.Your organization broadens identity management skills and understanding during the first phase.

6.Tivoli Identity Manager is introduced to your business with less intrusion to your operations.

Top-down approach

1.Your organization realizes a focused use of resources from the individual managed application.

2.The first implementation becomes a showcase for the identity management solution.

3.When the phases are completed for the managed application, you have implemented a deeper, more mature implementation of the identity management solution.

4.Operation and maintenance resources are not initially impacted as severely as with the bottom-up approach.

Program designed to swap the values of two variables?

You'll need 3 variables for this, here's a pseudo code for swapping values of 2 variables.

ALGORITHM SWAP

var1 = 10

var2 = 20

temp = 0

temp = var1 "temp = 10"

var1 = var2 "var1 = 20, originally 10"

var2 = temp "var2 = 10, originally 20"

END SWAP

Which side lengths allow you to construct a triangle?

Suppose a is one side, b is the other side, and c is the last side.

If a+b > c,

b+c > a,

c+a > b,

you can construct this traingle.

Or in simpler terms, any two side lengths'sum has to be bigger than the third.

E.G. If one side was 2, one side was 5, and the other side was 2, than

you aren't able to construct the traingle because

2+2 isn't bigger than 5.

BUT If one side was 2, the other side was 2, and the last was 3, than you could because

2+2>3, 3+2 > 2, and 2+3 > 2.

How do you get System Preferences back on to a standard user on Mac os x?

You ask the administrator to give you access to the System Preferences. They will usually say "No".

What is life orientation?

Rising in Consciousness is the main interest of life. Like a universal consciousness.

What does Algebraic mean?

Algebra is a branch of mathematics concerning the study of structures, relation and quantity. Together with geometry, analysis, combinatorics and number theory, Algebra is one of the main branches of mathematics.

What is a bitmask?

A bitmask is a pattern of bits indicating which bits in a second pattern are to be modified.

Do variables that are declared but not initialised contain garbage values?

It depends on the language. In C and C++, all static variables are zero-initialised at runtime but local variables are not, thus an uninitialised local variable will hold whatever value happens to reside at the memory allocated to the variable at runtime. However, the C/C++ compiler can be configured to warn against using an uninitialised variable.

In object oriented languages like Java there's no such thing as an uninitialised variable. This is because all Java variables are objects so we must pass the initial value to the object's constructor unless the object has default constructor. Attempting to default construct an object that has no default constructor is a syntax error.

Which activity is not included in the first pass of two pass assemblers?

In the first pass of a two-pass assembler, it will "prepare" for the second pass, ie. it'll build the symbol table which is later used in the second pass to generate code.

What is the algorithm of minimum heapify?

MIN_HEAPIFY(A,i)

{

l=LEFT(i);//calculates the left childs location

r=RIGHT(i);//right childs location

if((l<=A.heap_size)&&(A[l]<A[i]))

small=l;

else

small=i;

if((r<=A.heapsize)&&(A[small]>A[r]))

small=r;

if(small!=i)

{

exchange A[i] with A[small];

MIN_HEAPIFY

}

}

What is the purpose of a branch in a program?

A branch simply means a diversion from linear program flow. An unconditional branch allows the programmer to move to specific parts of their code when the situation calls for it (jump, goto, function call, loop, etc.). Conditional branches allow the programmer to devise logical diversions in program flow based on certain criteria (if, switch, loop, etc.).

Define an attribute in system analysis and design?

(1).Knowledge of people needs.

(2).knowledge of business application.

(3).knowledge of data processing principles.

(4).ability of communication.

(5).flexibility.

(6).well educated with sharp mind.

(7).analitical or reasoning mind

What is traversing arrays?

Traversing an array simply means visiting every element of the array exactly once. Pointers facilitates this job. A pointer is first created to contain the base address of the array thereby pointing the first element. As the pointer is incremented, it points to the very next element and so on till the last element is visited. Thus the elements are visited sequentially in the same order as they are stored in the array.