What are the disadvantages of procedure oriented programming in c plus plus?
There are no any disadvantages of procedure oriented programming in C++. You can use it as well as object oriented programming, generic programming or any other paradigm. Just remember that this way you won't be using many helpful features of that language.
Is it true that the transpose of the transpose of a matrix is the original matrix?
yes,
it is true that the transpose of the transpose of a matrix is the original matrix
What has the author C N Vakil written?
C. N. Vakil has written:
'The future of the rupee' -- subject(s): Currency question
'Poverty and planning' -- subject(s): Economic policy, Economic conditions
'Economic relations between India and Pakistan' -- subject(s): Foreign economic relations
'Deficit financing and inflation' -- subject(s): Inflation (Finance), Deficit financing
'Industrial development of India: policy and problems' -- subject(s): Industrial policy
'Growth of trade and industry in modern India' -- subject(s): Industries, Commerce
'Planning for a shortage economy' -- subject(s): Economic policy
'Government and the governed' -- subject(s): Social conditions, Social surveys
'Financial developments in modern India, 1860-1924' -- subject(s): Finance, Finance, Public, History, Public Finance, Taxation
'Poverty, planning, and inflation' -- subject(s): Economic policy, Economic conditions
'Finance under provincial autonomy' -- subject(s): Taxation, Finance
'Economic outlook in federal India' -- subject(s): Politics and government, Economic conditions
How do you write an algorithm to swap the values of x and y using a temporary variable t?
To swap the values of two variables, x and y, using a temporary variable t:
t = x;
x = y;
y = t;
To implement this algorithm as a function, the variables must be passed by reference. For efficiency, particularly with large or complex objects that are expensive to copy, use move semantics. The C++ standard library provides the following implementation (since C++11):
namespace std {
template<typename T>
void swap (T&& x, T&& y) {
T t = std::move (x);
x = std::move (y);
y = std::move (t);
}
};
The C++ standard library swap function (std::swap) uses the above implementation (since C++11). If a type does not support the move semantic, copy semantics will be used instead.
How do you increase the stack size of cc1plus dot exe for GCC 4 5 2 so it doesn't stack overflow?
If a stack is overflowing then there is usually some fundamental flaw in the program design. The best solution is to redesign the program. That said, one possible workaround might be to turn off optimisations with QMAKE_CXXFLAGS += -O0. However, it's far better to understand exactly why the stack is overflowing in the first place, and redesign the code to ensure it never happens. If you genuinely need a larger stack, then you can alter it programmatically using setrlimit.
Is c is middle level language justify your answer?
No, there is no such thing as 'middle level language'. C is high level language, and it is no way similar to Assembly language.
How do you motivate your class?
As a current student, be goofy and crazy. Gaining their attention is key for interest. As a teacher if you can capture the interest in a student it will be easier to motivate a him or her.
If this does not help, ask your class or classes yourself how class can be more interesting and intriguing.
int comp(const int a1[], const int a2[], const int size) {
int i;
for(i = 0; i < size; ++i) {
if(a1[i] != a2[i]) {
return 0;
}
}
return 1;
}
Representation of stack data structure in c plus plus?
Stack is an abstract data type that allows you to input and output data in a way that the first data which was placed in the stack will be the last one to get out. We use physical examples of stack in our daily lives such as the stack of dishes or stack of coins where you only add or remove objects from the top of the stack.
You can see the implementation in c++ in related links, below.
What is the difference between do while and while loop in java?
A do-while loop guarantees the body of the loop will execute at least once. A while loop might not execute at all.
// this code will execute, even though the condition test will always evaluate to false
do {
// stuff
}while(false);
// this code will never execute because the condition test will always evaluate to false
while(false) {
// stuff
}
How many commands are there in c language?
None. You are probably referring to keywords but keywords are not commands. In computing, a command is something that executes machine code in a timely manner (i.e., as immediately as possible). C keywords do not execute any code because the keywords are not immediately executable. In order to execute C code it must first be compiled and then linked, at which point it is no longer C, it is native machine code, and that machine code executes completely independently of the source code. The C compiler can also output an assembly source which allows us to view the machine code in a more user-friendly manner. Again, assembly is non-executable so there are no commands; we must assemble the source to create the native executable code, the only language the machine actually understands.
All C keywords are built-in identifiers that have special significance to the language itself. User-defined identifiers also have significance but, unlike keywords, we must declare their significance in terms of the language before we can actually use them in our code. By contrast, built-in identifiers do not need to be declared before we use them because the compiler already knows what they represent (hence they are built-in).
Many C keywords represent built-in data types, type modifiers, type information (operators) and storage classes:
bool, char, const, double, enum, float, int, long, short, signed, sizeof(), static, struct, typedef, unsigned, void
The remainder represent high-level control flow constructs:
break, case, continue, default, do, else, for, goto, if, return, static, switch, while
C also supports preprocessor directives and one preprocessor operator which are not part of the language itself, but are used specifically by the C preprocessor in order to generate C code for the compiler as part of the compilation process. Given that the compiler never actually sees them, they are not keywords, however they are included here for the sake of completeness.
#define, defined(), #elif, #else, #endif, #error, #if, #ifdef, #ifndef, #include, #pragma, #undef
How c is a general purpose programming language?
C can be used to write a wide variety of programs including video games, data-driven applications, graphics and drawing software, amongst many others. It is not a problem-oriented programming language, such as those written specifically to deal with artificial intelligence, but you could use it to write one, just as C was used to write C++, its successor and yet another general purpose language.
What is the correct data type of an accumulator variable used to store real estate sales total?
To ensure 100% accuracy, I would use an integer type rather than a floating point type and convert from pence to pounds on the fly if necessary. If you're only interested in whole pounds then an integer is still the way to go (increasing your range by 100 fold). The only issue then is how large a value you need to store in the accumulator. An unsigned 32-bit accumulator can accommodate a running total of up to 4,294,967,295, which converts to £42,949,672.95 or £4,294,967,295 in whole pounds, while an unsigned 64-bit accumulator can accommodate a total of 18,446,744,073,709,551,616, which converts to £184,467,440,737,095,516.16 or £18,446,744,073,709,551,616 in whole pounds. Personally, I'd go with the unsigned 64-bit integer just to err on the side of caution.
Although it's unlikely in this case, should you require negative values, a signed 64-bit integer has a range of 9,223,372,036,854,775,807 to -9,223,372,036,854,775,808.
Note that floating point numbers may incur errors due to rounding. Although such errors may be unlikely in this case, since you are only dealing with 2 decimal places at most, whole numbers are guaranteed to be 100% accurate.
Where is timing pointer for 93 f-150 5.0?
Ford 5.0L V-8s have the timing pointer at the bottom of the timing cover on the vehicle's right side of the harmonic balancer. Look behind the crankshaft pulley (the biggest one, it's at the bottom in the center of the engine). This is bolted to front of the balancer.
Who is considered an operator under CVOR?
A CVOR operator or carrier is the person responsible for the operation of a commercial motor vehicle. The carrier does not necessarily have to be the vehicle owner, but must hold a valid CVOR even when using vehicles that are leased or contracted. Operators are responsible for all the drivers and vehicles in their operation.
How you can interchange two integer values using swap variable in c language?
t = a; a = b; b = t; // t is a third integer variable (swap variable)
But here's a way without a swap variable, given as as a macro in C:
#define SWAP(a,b) { if (a!=b) { a^=b; b^=a; a^=b; }} // Swap macro by XOR
Once you define it, you can say swap(x,y) to swap x and y. The numbers kind of flow through each other and end up swapped.
Design an algorithm to determine the largest element in a list?
Assume the first element is the largest and store its value. Then traverse the remainder of the list, one element at a time. If the current element's value is larger than the stored value, overwrite the stored value with the current element's value. Once you've traversed the list, the stored value will hold the largest value.
Which is the primary need to develop Java programming from C plus plus?
The primary need to convert any language source, including C++, to Java is simply one of portability.
While C++ is itself portable, writing cross-platform code requires that you write code in a more abstract manner than you would when writing for a specific platform, making extensive use of compiler directives to determine which version of each translation unit will be compiled upon which particular platform. This increases code maintenance because you must then maintain separate versions of the platform-specific code, as well as include a different set of headers for each platform, and thus call different functions for each platform. You must also compile the source separately upon each supported platform, which means the code must be as generic as possible in order to be understood by every possible compiler. Thus cross-platform C++ code tends to be limited to the most popular platforms only, which usually means Windows and Unix only.
Java's higher level of abstraction is such that you need only write one set of instructions and compile it one time only. The Java virtual machine handles all the low-level machine specifics, so the same executable will run on any machine that has a Java virtual machine implementation. While this greatly reduces code maintenance and increases portability, the need to interpret the compiled byte code (rather than native machine code which requires no interpretation) reduces performance enormously. Thus the ease of maintenance has to be weighed against the loss of performance to determine if it is a worthwhile exercise.
Just because you're good at algebra doesn't mean you have to be good at programming. Algebra is taught from a very early age (even in kindergarten) and it is one of those areas of mathematics, besides arithmetic and geometry, that virtually everyone uses every day without even realising it. It's such an elementary subject that there are no specific subjects you can do just because you're good at it. However, if you have a yearning to take algebra further then you might consider abstract algebra, an area of advanced mathematics studied primarily by professional mathematicians. No programming required, but there's absolutely nothing stopping you from learning to program. Even if you're no particularly good at it, it's still useful to have an appreciation for a variety of languages.
What are the system requirements for language c?
1. byte-organised memory (every bytes of the memory has to be accessible)
2. support for every ASCII characters (0-127)
How the new keyword allocates memory?
The new keyword in programming languages like C++ and Java allocates memory on the heap for an object or data structure. When new is called, it requests a block of memory sufficient to hold the specified type, initializes that memory (if applicable), and returns a pointer or reference to the newly allocated memory. This memory remains allocated until it is explicitly deallocated using delete in C++ or is automatically reclaimed by the garbage collector in languages like Java. Proper memory management is crucial to avoid memory leaks and ensure efficient use of resources.