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

Why you use if loop in telecoms?

No such thing as if-loop. if-else statement is not a loop.

What is l value in c program?

An l-value is an expression with an address, named after being able to occur on the left side of the = (assignment) operator. (Technically, a variable declared with a const keyword is an l-value, but cannot occur on the left side of the assignment operator, so the original definition is no longer accurate.)

What information will you find in the Active Work Queue?

Open tasks that I or another user have yet to complete.

How many times will the program will print Language?

Without seeing the program, I can only say: 'zero or more times'

What is post decrement?

Post decrement is where you decrease the variable by one after using it.

void someFunc(int s) { printf(s); }

void main()

{

int s = 3;

someFunc(s--);

printf(s);

}

will output 3 then 2.

In Computer programming Why is it considered good programming practice to define the number of array items as a constant before declaring the array?

In computer programming, (1) When a number is needed several times in a program, it is good practice to give that number a name. (2) When a name refers to a number that will never change during a run of a program, it is good practice to declare it as a constant before using it.

In most programming languages, we do not define the number of array items as a constant. In many programming languages, it is easy to add items to an array, and an array keeps track of the number of items it holds, which a program can access using something like "array.length" or "array.shape". However, in C and C++ programming, the programmer must define the size of the array at the time it is defined, and the array does not keep track of the number of items it contains. To not define your array would leave the program open to unchecked growth. "Capping" the array with an upper value ensures that, if something goes wrong, you will not crash the application or system. Also, capping the array will make debugging potentially easier. Capping requires using that number in several places, and so (1) tells us it is good practice to give that number a name. Since it is not possible(*) to change the size of an array in C or C++, the number that holds the number of items in the array will never change, and so (2) tells us it is good practice to declare it as a constant. (*) There are a few tricks one can do with malloc() and realloc() that have the same effect as resizing an array, although technically all those tricks merely create a new fixed-size array.

What is transport operators?

In terms of Air it has to do with which FAA certificate they operate under. For example Part 135 is unscheduled passenger transport.

http://www.talonairjets.com

When variable in c gets memory After declaration or initialization?

Definition.

Example:

extern int x1; /* declaration */

int x2; /* definition */

int x3= 2; /* definition with initialization */

What is the range of integer char float for a 16-bit computer?

Consult your limits.h and math.h.

For char it will be -128..127 or 0.255 (signed and unsigned).

What types of scalar data are typically utilized in cross- tabulation?

Zikmund (2003) described the nominal scale as "a scale in which the numbers or letters assigned to objects serve as labels for identification or classification" (p. 296). The ordinal scale is "a scale that arranges objects or alternatives according to their magnitudes" (Zikmund, 2003, p. 297). Both nominal and ordinal scales are typically utilized in cross-tabulation analysis. (Other types of scalar data would include interval or ratio).

http://www.quickmba.com/marketing/research

-is another website describing nominal and ordinal scales as used for cross-tabulation.

Zikmund, W. G. (2003). Business research methods (7th ed.). Thousand Oaks, CA: Thomson/South-Western.

What can you do when error occurs header file could not open?

You should find out the reason of the problem.

Example:

bad: #include
good: #include

How much space is occupied by an integer pointer float pointer..... n soo on?

The size of a pointer is not dependent on the size of the target integer, float, and so on. Typically, a pointer is 2 bytes (16 bit system), 4 bytes (32 bit system), or 8 bytes (64 bit system).

Note: that's what sizeof is good for

As examples: (for a 32 bit Windows platform)

int a; /* sizeof(a) is 4 */

int* pa; /* sizeof(pa) is 4, and sizeof(*pa) is also 4 */

double d; /* sizeof(d) is 8 */

double* pd; /* sizeof(pd) is still 4, and sizeof(*pd) is 8 */

typedef struct s { /* using alignment option /zp1 */

int a;

double b;

char c[16];

} ss;

ss myss; /* sizeof(myss) is 28 */

ss* pmyss; /* sizeof(pmyss) is still 4, and sizeof(*pmyss) is 28 */

Define parent function?

A parent function refers to the simplest function as regards sets of quadratic functions

121 S ON A C C B?

121 spaces on a Chinese checkers board

What is a c program to implement trapezoidal and Simpson's methods?

ITS EASY...

TRY THIS OUT..

TRAPEZOIDAL METHOD

#include

#include

#include

float valcal(float x){

return (x*x*x);

}

int main(){

float a,b,h,c,I;

int n,i;

printf("THE TRAPEZOIDAL RULE:\n");

printf("---------------------");

printf("\n\n\nEnter the two limits and the no. of divisions:\n");

scanf("%f %f %d",&a, &b, &n);

h=(b-a)/n;

//printf("\nVALUE of h: %f\n", h);

c=a;

I=valcal(a)+valcal(b);

//printf("\nVALUE FOR a: %f\n", valcal(a));

//printf("\nVALUE FOR b: %f\n", valcal(b));

for(i=1;i

c=c+h;

//printf("\nValue of c for loop %d: is %f\n ",i,c);

if(c>=b){

printf("\n\nc>b\n\n");

break;

}

//printf("\nVALUE FOR %f: is %f\n",c, valcal(c));

I=I+(2*valcal(c));

//printf("\nI right now is %f", I);

}

printf("\n\n\nThe integration of x*x*x is: %f",(h*I)/2);

printf("\n\n\n");

system("pause");

}

SIMPSON'S 1/3RD METHOD

#include

#include

#include

float valcal(float x){

return (1/(1+x*x));

}

int main(){

float a,b,h,c,I;

int n,i;

printf("THE SIMPSON'S ONE-THIRD RULE:\n");

printf("------------------------------");

printf("\n\n\nEnter the two limits and the no. of divisions:\n");

scanf("%f %f %d",&a, &b, &n);

h=(b-a)/n;

//printf("\nVALUE of h: %f\n", h);

c=a;

I=valcal(a)+valcal(b);

//printf("\nVALUE FOR a: %f\n", valcal(a));

//printf("\nVALUE FOR b: %f\n", valcal(b));

for(i=1;i

c=c+h;

//printf("\nValue of c for loop %d: is %f\n ",i,c);

if(c>b){

printf("\n\nc>b\n\n");

break;

}

//printf("\nVALUE FOR %f: is %f\n",c, valcal(c));

if(i%2==0)

I=I+(2*valcal(c));

else

I=I+4*valcal(c);

//printf("\nI right now is %f", I);

}

printf("\n\n\nThe integration of x*x*x is: %f",(h*I)/3);

printf("\n\n\n");

system("pause");

}

NEED MORE HELP...

MAIL ME YOUR PROB... SEE YA

Can you use commit statement after truncate?

You can use COMMIT any time, but it is not necessary after TRUNCATE TABLE.

How do you break the infinite loop program in turbo c plus plus without break key?

In short, you don't. By definition, an infinite loop is one that has no exit condition. For example:

while( 1 );

When execution reaches this line, the program will get no further. It will continually execute this same line of code because the only way for this loop to exit is when the literal constant 1 becomes the literal constant 0 -- which would clearly be impossible.

By the same token, the following lines are also infinite loops:

do while( 1 );

for(;;);

Infinite loops of this kind are completely useless in production code. Apart from the fact they do nothing remotely useful, an infinite loop renders the program completely invalid. And yet we hear the term infinite loop being used in code all the time.

The truth is that while we do use the term infinite loop, it is not strictly infinite. What we really mean is that although the loop statement needn't have an exit condition, the body of the loop does!

By way of an example, consider the following infinite loop:

while( 1 )

{

if( !rand() )

break;

}

Here, the loop statement is clearly infinite, but the body contains the all-important exit condition. In this case, the loop continually produces random numbers in the range 0 to 32767. If the number is zero, then control passes to the break statement at which point the loop ends and execution continues at the statement following the closing brace of the loop. Thus on every loop there's a 1 in 32768 chance the loop will end. There's a remote possibility the loop may never end however it's highly unlikely. Note that in its current form, the random numbers will produce the same sequence over an over and the loop will therefore execute the same number of times every time the program is run. But even if we seed the random numbers to produce a different sequence each time, the loop will exit after just a few seconds at most. The odds of never ever producing a zero are remote in the extreme.

So that's the so-called infinite loop -- which is not really infinite after all. But to answer the question, we break out of an infinite loop by providing at least one exit condition within the body of the loop. If the program is to be run within an event-driven environment (such as Windows), we might periodically test the message queue to see if a specific key sequence is pending (such as ESC) and prompt the user to save the current state of the loop so that it can continue at a later date before gracefully exiting the loop. By the same token, we should also check for a program exit message (perhaps the user clicked the close window button, or even chose to shutdown Windows in the middle of the loop) and we must cater for those eventualities too.

Ultimately, how you exit an infinite loop will depend entirely upon the purpose of the loop. There is no one-size-fits-all solution. But there must be at least one exit condition that must logically fire at some point in time. If not, the loop is truly infinite and will completely invalidate your program.

What is the 4th derivative of the position function?

Distance f(x) = x(t) = 1/2at2+vit+xi Velocity f'(x) = v(t) = dx/dt=at +vi Acceleration f''(x) = a(t) = dv/dt Jerk f'''(x) = j(t) = da/dt The fourth derivative is not universally accepted, but some have called it "snap", and the fifth and sixth derivatives "crackle" and "pop" respectively. Snap f(4)(x) = s(t) = dj/dt Crackle f(5)(x) = c(t) = ds/dt Pop f(6)(x) = p(t) = dc/dt