Can a processs BSS segment grow during program execution?
No. The size of the data segment (which includes the BSS) is determined at compile time and cannot change at runtime. The data segment stores all the program's constants, global variables and static variables, the total size of which can be determined at compile time and is therefore fixed at that point. BSS is an abbreviation of Block Start by Symbol and is used specifically to allocate all global and static variables that are either in an uninitialised state or are explicitly initialised to zero. Global and static variables initialised with non-zero values are allocated separately from the BSS, as are all the constants.
What material would be acceptable if installed in a loop?
Materials acceptable for installation in a loop typically include flexible piping systems made from polyethylene (PE), polyvinyl chloride (PVC), or cross-linked polyethylene (PEX). These materials offer good resistance to temperature changes and pressure variations, making them suitable for loop applications such as heating and cooling systems. Additionally, metals like copper and stainless steel can also be used in loops, provided they are properly insulated and protected from corrosion. Always consult specific engineering guidelines and local codes for material suitability.
What is Difference between index register and stack pointer?
An index register contains an address that can be used during effective address generation, often along with an offset in the instruction or in another register. This is most useful when accessing elements of arrays or structures. A stack pointer is a specialized index register that points to a region of memory that can store temporary elements, in a last-in-first-out structure, such as return addresses, parameters, and local storage for function calls.
What is step involve is using data file in c plus plus programming?
Declaration of file pointer
opening of file in desired mode.
performing the desired operation.
closing the file
Write a program to reverse a 5 digit number using function?
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int reversenum(int original);
int main(int argc, char * argv[]){
int numval;
if(argc != 2){
printf("Please specify a number.\n");
exit(1);
}
numval = atoi(argv[1]);
printf("The reverse of %i is %i\n", numval, reversenum(numval));
return 0;
}
int reversenum(int original){
int returnval = 0;
int val = abs(original);
int sign = sgn(original);
while(val > 0){
returnval *= 10;
returnval += val % 10;
original /= 10;
}
returnval *= sign;
return returnval;
}
What is the Data structures used for stack?
A stack is a linear last-in first-out list type data structure. Several implementations are possible. Two examples are the array and the linked list.
The array is quick, but is limited in size.
The linked list requires overhead to allocate, link, unlink, and deallocate, but (except for total available memory) is not limited in size.
One compromise might be a linked list of arrays. Another compromise might be to not necessarily unlink and delete when an element is popped off the stack.
A member function that allow the user of the class to change the value in a data member is known as?
I presume you mean C++, rather than C.
That type of function is known as a mutator function.
Why static variables are initialized to zero?
When a variable is declared, your computer assigns a section of memory to that variable. If the variable isn't initialized, there's no way of knowing what data is already stored in that section of memory, which can cause errors in your programs.
In managed languages, such as C#, this is done automatically at declaration. Although it's still good practice to initialize variables yourself.
How to Design a 4-bit counter that only counts even numbers?
- - - - -
Easy.
A four-bit counter counts from 0 (D1-D4 all low) to 15 (D1-D4 all high). If you only want it to count 0, 2, 4, 6, 8, 10, 12 and 14--IOW all the numbers where D1 is low--just ground D1 and run the clock twice as fast as you normally would.
How do you insert front in double ended queue?
the double linked list don't understanding that's why i am searching net.....
Yes. Use a control parameter before the variable argument list that determines how many arguments will follow. E.g., the printf() function uses a string parameter as the control parameter. The number of escape sequences in the string determines the number of arguments that are expected to follow, and each escape sequence in the string is expanded from left to right according to the arguments that follow. A simpler approach is to pass the number of arguments that will follow as a named argument. E.g.,
void print_nums(int n, ...)
{
// n tells you how many numbers are to be expected in the va_list.
}
Answer
Yes, there can be solution.
#1: explicitly specifing:
extern void variadic_1 (int n, ...);
variadic_1 (3, "first", "second", "third");
#2: using terminator:
extern void variadic_2 (...);
variadic_2 ("first", "second", "third", NULL);
A dummy loop is a programming construct that executes a set of statements repeatedly without performing any useful work or computation. It's often used for testing, to create delays, or to maintain program structure where a loop is syntactically required but no specific operations are needed. Additionally, dummy loops can serve as placeholders during development or debugging processes.
What operator reverses the meaning of a teststatement?
The operator that reverses the meaning of a test statement is the logical NOT operator, often represented as ! in many programming languages. When applied to a boolean expression, it negates the value: if the expression evaluates to true, applying the NOT operator makes it false, and vice versa. This allows for the inversion of conditions in control flow statements, such as if conditions.
A waterjet operator is a skilled technician who operates waterjet cutting machines, which use high-pressure streams of water, often mixed with abrasives, to cut through various materials such as metal, stone, glass, and plastic. The operator is responsible for setting up the machine, programming cutting paths, and ensuring precision in the cutting process. They also conduct routine maintenance and troubleshoot any issues that arise during operation. This role requires a good understanding of machinery, material properties, and safety protocols.
Give the names of library functions included in string file?
strlen, strcpy, strcmp and many others. Consult your help system.
How do you find factorial of given number?
Factorials are the product of 1 and all the integers up to the given number.
Simply put,
5 factorial or 5! = 5*4*3*2*1
What is the use of header file stdbool.h?
stdbool header file use for a new data type that is boolean value
What is the product of the first 100 whole numbers?
The product of first 100 whole numbers will be 0.It is because 0 is also a whole number and any thing multiplied by 0 will give out answer to be 0,no matter how long the series is.
How does the inline mechanism in C reduce the run-time overheads?
inline functions are compiled very fastly and uses the free memory to boot it as soon as possible
How many character include in an identifier name in C?
The C99 standard (ISO/IEC: 9899:1999) has the following to say on the matter:
5.2.4.1 Translation limits
The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits:
Footnote: Implementations should avoid imposing fixed translation limits whenever possible.
There is no practical reason to impose these limits within the compiler let alone to make these limits available to the programmer, hence there is no standard header that defines them. Even if there were, the information is of no use to you let alone to the compiler, given that the compiler cannot arbitrarily change your identifier name lengths to suit. After all, those identifiers are supposed to be portable!
If translation limits do exist for your specific compiler, then it should be documented. A C99 compliant compiler must meet (or exceed) the limits defined by the C99 standard but those limits are such that "ordinary", portable code should never exceed them. After all, an identifier is only useful if it is readable, but if you have several identifiers such that the first 63 characters are an exact match then your code is anything but readable.