C program to print the format 4 1 44 11 444 111 4444 1111 000000000 444444 3333 22 1?
#include <stdio.h>
int main (void) { puts ("4 1 44 11 444 111 4444 1111 000000000 444444 3333 22 1"); return 0; }
A pointer to function which receives an int pointer and returns a float pointer?
float *(*funptr)(int *);
float *fun (int *);
funptr= fun;
Which category of c references are always aliases?
What 'references' and what 'aliases'? Try to rephrase your question.
False. The square braces are the subscript operator. The subscript is the operand, the zero-based offset index that is passed to the operator.
Primitive migration refers to the natural movement of early human populations, driven by the search for food, resources, and favorable living conditions. This form of migration often involved nomadic lifestyles, where groups would follow seasonal patterns and animal migrations. Over time, primitive migration contributed to the spread of humans across various continents and the development of diverse cultures. It contrasts with modern migration, which is often influenced by economic, political, or social factors.
I don't really understand your question, but try these commands, they might help to understand the possibilities:
touch demo.c
echo '*.c'
echo "*.c"
echo *.c
echo \*.c
Java solution
public static final int[] getMiddle(final int[] a, final int[] b) {
return new int[] {a[1], b[1]};
}
C solution void getMiddle(const int a[], const int b[], int ret[]) {
ret[0] = a[1];
ret[1] = b[1];
}
What is tree abstract data type?
It is my opinion that you're just looking at a tree structure for data; calling it asbstract just means you're not looking at a concrete implementation - rather the idea of tree data structuring.
There are a couple of links below to get you started
http://en.wikipedia.org/wiki/Tree_(computer_science)
http://www.sqa.org.uk/e-learning/LinkedDS04CD/index.htm
WRT it being a data type, it depends on the language. Some have Tree Types in the language, C# for example, some require you to build your own.
I hope this helps - if not I'm sure someone much wiser than I will come along...
Who is better quick sort or merge sort?
Statistically both MergeSort and QuickSort have the same average case time: O(nlog(n)); However there are various differences.
Most implementations of Mergesort, require additional scratch space, which could bash the performance. The pros of Mergesort are: it is a stable sort, and there is no worst-case scenario.
Quicksort is often implemented inplace thus saving the performance and memory by not creating extra storage space. However the performance falls on already sorted/almost sorted lists if the pivot is not randomized.
== ==
How do you debug a program that is already running?
Assuming that you have written a program named abc.c and created executable abc.
Steps:
1. run your program from command line ./abc
3. get the PID processid of the program from PS aux | grep abc
3. start the gdb from command line
4. type following command on GDB prompt
(gdb) attach PID
where PID = your program's processid got from step 1.
What function is used to release the memory on heap?
The free() function releases memory obtained with the malloc() family of functions. The delete and delete [] operators release memory obtained with the new operator.
Note: realloc() can allocate and free memories as well as reallocate.
When the module can modify the argument in the calling part of the program?
when it is passed by reference
What is the difference between normal variable and register variable in c?
In C/C++ when we declare a variable;
e.g
int var;
for this variable (i.e. var) memory is being reserved in RAM (i.e out side processor).
If we declare variable like that;
register int var2;
for this variable memory is being reserved in register of CPU (i.e. withing processor)
But register variables are discouraged because processor has to work with registers.....
Note: strictly speaking, storage class 'register' means: dear compiler, you might optimize this variable into register, as I won't ever request its address. But of course, it's up to you to decide.
Can you fall pregnant while you have loop?
Yes, it is possible to become pregnant while having a loop, also known as an intrauterine device (IUD). While IUDs are highly effective forms of birth control, no method is 100% foolproof. If pregnancy occurs, there is a higher risk of complications, such as ectopic pregnancy, so it's important to consult a healthcare provider immediately. Regular check-ups can help ensure the IUD is in place and functioning correctly.
What differences between reentrant function and recursive function?
A reentrant function is called by the program during execution and can be interrupted and recalled later. A recursive function can call itself during execution and repeats itself without interruption.
How do You create a n by n matrix in C where each element contains two numbers?
It is not very difficult if you can image how it looks. In your case what you need is rectangular Cuboid with height N, width N and depth 2.
Here is example in C:
/* There N = 2 */
int matrix[2][2][2] = 1, 2}, {1, 2}}, {{1, 2}, {1, 2;
/* There N = 3 */
int matrix[3][3][2] = 1, 2}, {1, 2}, {1, 2}}, {{1, 2}, {1, 2}, {1, 2}}, {{1, 2}, {1, 2}, {1, 2;
These two are statical, it is possible to create dynamical cuboid, but it is more complex and requires knowledge of pointer and memory management.
Definition or function of hoe?
A hoe is an agricultural tool used for tilling the land. Tilling means breaking the ground and making it suitable for planting crops, fruits and vegetables.