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 the maximum dimension of array can be accepted in c?

C++ doesn't enforce any limits on array dimensions. Limitations are enforced by the hardware. The first limitation is available memory (including virtual memory). The larger the objects in the array, the fewer elements you can create in memory. The second limitation relates to the maximum integer that can be mapped to a size_t data type (which is dependent upon the architecture), however you're far more likely to run out of memory long before reaching this limit.

For instance, a 32-bit system has 4GB of addressable memory, thus (in theory) can accommodate an array of char with a 4,294,967,295 dimension (assuming an 8-bit char type). However, that would leave no memory for the operating system let alone the IDE, so the maximum would be somewhat lower than 4GB.

On a 64-bit system, a 4GB array of char would be perfectly feasible, even if the system only had 2GB of physical memory, due to the much larger address space available (18,446,744,073,709,551,616 bytes).

However, an array that partially requires virtual memory would be tremendously slow to access due to constant swap file access. Depending on the nature of the array, if it requires more memory than is physically available, it might be better handled via a database or as a random access file stream.

What is the best sorting technique for already sorted array?

If it is already sorted, the best is to leave the array as it is.

If it is already sorted, the best is to leave the array as it is.

If it is already sorted, the best is to leave the array as it is.

If it is already sorted, the best is to leave the array as it is.

How do i Prevent users from saving certain file extensions to c drive using group policy?

Hi Group policy won't do it, but check this: http://blogs.techrepublic.com.com/datacenter/?p=201 File screening on the machine... Habeeb

What are the pseudocode keywords for loop?

Pseudo code does not have key words, you make it up, that's why it is pseudo.

What are signed bits?

In computer science, the sign bit is a bit in a computer numbering format that indicates the sign of a number. In IEEE format, the sign bit is the leftmost bit (most significant bit). Typically if the sign bit is 1 the number is negative (in the case of two's complement integers) or non-positive (for ones' complement integers, sign-magnitude integers, and floating point numbers), while 0indicates a positive number.

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.

Where are you on the list?

item; member; element; node; point etc

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)

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.

What mean of RUN in c?

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

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.

How does sequential files work?

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

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.

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 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.

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 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;

}