answersLogoWhite

0

📱

C Programming

Questions related to the C Computer Programming Language. This ranges all the way from K&R to the most recent ANSI incarnations. C has become one of the most popular languages today, and has been used to write all sorts of things for nearly all of the modern operating systems and applications. It it a good compromise between speed, power, and complexity.

9,649 Questions

What is mean by resident monitor?

A Resident monitor (1950s-1970s) was a piece of software that was an integral part of a general-use punch card computer.

additional ;

Its main function is to control transferring of Computer from one job to another job

When only a copy of the argument's value is passed into the paremeter variable?

By default, a copy of the argument's value is passed into the parameter variable. This is "call by value" semantics, and the called function can do whatever it wants with the parameter, but it cannot alter the original copy. Sometimes, in C and C++, you can pass the address of the value instead. This is "call by address" semantics, but the called function must be designed to handle it - in this case, the called function can alter the original value. (Actually, it is always "call by value" - what we call "call by address" is simply passing the value of the address, a subtle distinction which is important to understanding the language.)

How do you enter ASCII characters?

You type it. - in a way that is correct, but perhaps not over helpful.

ASCII = American Standard Code for Information Interchange. Over the life of computers, there have been several standards for encoding letters and numbers into binary strings ('0' and '1'). Early computers only had 4 bits for each character, this has slowly increased to the current 8 bits per character. Each standard has a name, ASCII is the name for the arrangement most commonly used today.

Though that is not quite accurate, first there are two ASCII codes, there is 7-bit ASCII and there is 8-bit ASCII, both with the same name. Also, most people use Microsoft Windows, and Microsoft do not actually follow the ASCII standard completely, some of the characters in Windows are different to ASCII on other platforms. Hence a common name used of 'MS-ASCII' when network technicians need to define which they are using, or converting.

If you have a modern small computer (Desktop, Notebook etc with Windows, Linux or MAC) it uses ASCII already, you do not need to do anything to get it. If you happen to own an IBM mainframe then this uses EBCDIC coding which is different - but the system includes all the code needed to automatically convert files between the various codes for you.

What is RDBMS and its advantages?

Advantage is More secure and Normalization(reducing Redundancy,repitation,concurrency),avoiding problems while processing 2 things at a time.(while these are not possible in file proccessing systems)

Disadvantage is it requires more knowledge to implement.

What is the limitations of do while loop in c?

To repeatedly perform the logic inside the loop while the condition holds true (you would expect something inside the code block to eventually cause the test condition to evaluate as false).

Most basic examples given in text books use an incrementing variable which could also be implemented as a for loop:

int i = 0;

do {

i++;

} while (i < 100);

A better example would be:

bool door_opened;

do {

door_opened = ring_doorbell(); /* an example function*/

} while (door_opened == false);

PS its probably 10 years since I wrote any C so syntax might not be 100% accurate.

Difference between pseudocode and flowchart?

Pseudo code is a sentence-like representation of an piece of code.

A flowchart is a symbolic representation of code, using box shapes and arrows. http://wiki.answers.com/What_is_the_differences_between_Pseudocode_and_Flowchart#ixzz16xbjczkm

Which is more good to use for loop or while loop?

The main difference comes into picture when you use continue with them i.e. for and while.

In a while loop if continue is used before the increment of a variable is done it converts into a infinite loop.

i=1;

while(i<10)

{

/* do stuff */

if(i==6);

continue;

i++;

}

The above piece of code will turn into an infinite loop.

for(i=1;i<10;i++)

{

/* do stuff */

if(i==6);

continue;

}

In the above for loop the value of will be incremented once it attains the value 6.

Therefore it will not turn into a infinite loop.

Cheers.

astvansh> 'for' statement takes the start condition, stop condition, and the increment. 'while' statement just takes the stop condition.

One scenario (which i can think of) where while 'needs' to be used rather than a for, would be when the counter needs to be incremented/decremented conditionally...

string[] arr = {"a", "b", "b", "c"};

int i = 0;

while( i< 10)

{

// do something constructive

if(arr[i] == "b")

{

i = i + 2;

}

else

{

i++;

}

}

Cheers,

Ajeesh

Another main difference between the two: a 'for' loop is called a determinate loop, meaning that we usually use it when we know ahead of time how many iterations we want. The 'while' loop is an 'indeterminate' loop, because we usually use it in situations where we do not know the number of times the loop may iterate.

Difference between binary files and text files?

"ASCII file" refers to a "text" file that is readable by the naked eye (it only contains the letters a-z, numbers, carriage returns, and punctuation marks). Conversely, a binary fie is not readable by the naked eye (it contains the ASCII characters in addition to binary codes).

How do you Compile the C Programs in command prompt?

That would depend on the compiler you were using and the file(s) you were trying to compile. Differen compilers would have different ways to run them, so you would need to know the commands for your particular compiler, if it is capable of running from the command prompt.

Example of different project management software?

There are several sites where you can gain insight into the different project management software solutions available. Here are two that I've found to be helpful:

http://www.web-based-software.com/project-management/

http://online-project-management-review.toptenreviews.com/

I personally use @task and have been very happy with it, but you can choose for yourself. Here's the link to @task's site if you're interested - http://www.attask.com.

Explain process control block?

The Process Control Block acts as a library of information about the processes in a system. Specific information is stored in the process control block highlighting important information about each process.

High level language?

It is very easy to write and make the system do what u want

Why stack pointer is 16- bit register?

Program Counter( PC)stores the 16-bit memory address of the next instruction to be fetched.

Stack Pointer (SP)

stores the address of a memory location which is used as a stack.

What is the difference between high level language and machine language?

The difference between high level languages and machine languages are as follows: 1)Machine language uses binary numbers/codes but high level languages(HLL) use key words similar to English and are easier to write. 2)Machine Language is a Low level language and is machine dependant while HLLs are not.

What is pointers in oop?

A pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address.

Why must high level languages be translated?

High level languages cant be understood by the computer as it performs all tasks in binary form. So its necessary to convert high level language into machine oriented language

How do you convert a while loop to do-while loop?

A for loop is classified as an iteration statement. A simple example might be...

For x = 1 To 10

'loop body

Next x

The same loop expressed as a while loop (classified as a control flow statement) could be...

x = 0

Do While x < 11

'loop body

x = x + 1

Loop

.

What are the drawbacks of computers?

Computers are wonderfully efficient when they are working properly, but they are very complicated and have endlessly many different ways of breaking down, and when they do break down they are often very difficult to fix. Compare record keeping with a computer or with a pen and a piece of paper. The computer records can be much more easily updated and edited than paper records can be, but the paper will never crash, even if there is a power failure.

What is a USB device?

The abbreviation is of Universal Serial Bus, which refers to the way the device corresponds with a computer in order to deliver or exchange files.

The physical link is a small 4-pole connector, but there is of course a goodly amount of controlling electronics with it.

There there are very many USB devices, of which the small portable memory "stick" is perhaps the simplest. Digital cameras also use USB connections to allow you to transfer images from them to computers.

Differentiate between static allocation and dynamic allocation?

BS Anwer- static allocation is when something is moved to a location permanantally and dynamic allocation is when something is moved temporarily, but will move again.