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.
The hash tag used before the name is mainly for Twitter. These tags, however, can also be used on Facebook and other social media networks. The tags basically link followers and friends of the message to a central site where they can post pictures, thoughts, and discussions. In this instance, the hash tag is asking a question that should receive timely responses from friends and followers.
Learn C! :-)
There are several functions in C that can be used to read input from the user, such as getc(), getchar(), and scanf(). Files can be written to using fprintf() and putc(). They can be opened with fopen() and closed with fclose().
C program for sorting the numbers?
C program for sorting the numbers is very basic, start writing it and if you are having problems, post your program here and a description of the problem and you will be helped.
If you are taking a computer course, how do you expect to pass exams if you have plagiarized someone else work for your assignments.
To print the name without using semicolon?
#include <stdio.h>
int main (void) { puts ("the name"); return 0; }