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

Does C even have pass by reference?

Strictly speaking, no. All arguments in C are passed by value. However, when the argument being passed is a memory address, although the address itself is passed by value, we're effectively passing the object that resides at that address -- by reference.

Thus when a function's formal argument is a pointer variable (of any type), then it can be taken as read that the function is using the pass by reference semantic rather than the pass by value semantic. Nevertheless, it is important to keep in mind that the formal argument is assigned a copy of the actual argument and is therefore being passed by value.

Memory address register is used to store?

memory addres register is used hold data addresses that refer to the data portion of the memory(by umar farooq.pk) memory addres register is used hold data addresses that refer to the data portion of the memory(by umar farooq.pk)

Where are you on the list?

item; member; element; node; point etc

What is inter-node?

An internode is a portion of plant stem between nodes.

An internodal segment is a portion of nerve fibre.

How does Management information system help in decision making?

if all the persons of the organization havin' all the information about company than company easily find a perfect dicision for the company.

Why is generally a good idea to take previous measurements into account after a node synchronizes its clock to that of another node?

It gives an indication of the time drift between the two nodes. This can be useful in determining how often the nodes must synchronise, depending on how much drift is deemed acceptable.

What mean of RUN in c?

Nothing. In TurboC, though, it means: Compile, Link and Execute the current program.

Difference between variable and constant in terms of memory types?

constant means data item whose value cannot be altered or change. whereas variable is named storage location whose value can be manipulated during program run.

How does sequential files work?

Sequential files do not 'work', they are nothing but sequences of bytes.

Distinguish between C programming and BASIC programming?

C is a systems language for precise, concrete development. BASIC and its derivatives are teaching and prototyping languages for rapid, abstract development.

How do you accept a string and print if it is a palindrome?

// Return true if str is a palindrome

bool is_palindrome (char* str) {

int len;

char* cpy;

char* ptr;

bool b;

len = strlen (str);

if (!len) return false;

cpy = malloc (sizeof(char) * (len + 1));

ptr = cpy;

while (*ptr=*str)

{

if (*ptr>='A' *ptr<='Z') *ptr+=('a'-'A');

if ((*ptr>='a' && *ptr<='z') (*ptr>='0' && *ptr<='9')) {

++ptr;

} ++str;

} *ptr = '\0';

--ptr;

str = cpy;

while ((cpy!=ptr) && (cpy!=(ptr+1)) && (*cpy==*ptr))

{

++cpy;

--ptr;

}

b = (*cpy==*ptr);

free (str);

return b;

}

How do you write a c program that define a structure linesegment that will represent a line segment by the co-ordinate of its endpoint?

There will a part like this:

typedef struct Point { double x, y; } Point;

typedef struct LineSegment { Point from, to; } LineSegment;

How do you write a c program for electricity billing system?

It would most likely contain multi-class object oriented programing at a relatively advanced and complex level using a Higher Level programming language.

Why hl register pair is called as memory pointer?

Because in many statements you use HL as a pointer to memory data, eg:

LD B,(HL)

SUB A,(HL)

LD (HL),E

What is mean by file organization in data structure of c?

File organization is the methodology which is applied to structured computer files. Files contain computer records which can be documents or information which is stored in a certain way for later retrieval. File organization refers primarily to the logical arrangement of data (which can itself be organized in a system of records with correlation between the fields/columns) in a file system

Why merge sort is not in-place?

this use auxiliar data structure for to work, in-place is that on the same data structure of input this sort