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

What is the function of keyword extern?

The extern keyword declares a variable or function and specifies that it has external linkage (its name is visible from files other than the one in which it's defined). When modifying a variable, extern specifies that the variable has static duration (it is allocated when the program begins and deallocated when the program ends). The variable or function may be defined in another source file, or later in the same file. Declarations of variables and functions at file scope are external by default. In C++, when used with a string, extern specifies that the linkage conventions of another language are being used for the declarator(s). C functions and data can be accessed only if they are previously declared as having C linkage. However, they must be defined in a separately compiled translation unit. Microsoft C++ supports the strings "C" and "C++" in the string-literal field. All of the standard include files use the extern "C" syntax to allow the run-time library functions to be used in C++ programs. If you find this info useful Please vote!!!

On a Lincoln LS 2001 how does one get the rear break piston to retract as using the usual C clamp retraction method will not work?

The easiest way is to go to a parts store and purchase the tool made for screwing down the piston. I think it's like $10 for the cheap one and you just put it on the end of a ratchet. You can fit it in the small grooves on the piston and turn clockwise and it will go down.

You can also use the wrench for removing the nut on most grinders. The one from a DeWalt grinder works perfect.

AnswerI haven't worked on one before, but I'd be tempted to back off the brake fluid bleed screw and see if I can retract the piston then.

I replaced the rear pad's on my 2000 ls and there is a square box tool that's supost to fit inside the piston and the you use a ratchit to turn it in I went and bought the tool that's supost to fit but it didn't work so used a rag and channel locks to turn it in

Answerthey screw in..turn and apply presure helpful hinti just replaced the rear brake pads on my wifes 2002 Lincoln ls. i loosend the bleeder screw a little and used channel locks to turn the piston down. didn't look like it was working at first, then it started going down real easy. i almost had to learn the hard way! be careful not to tear the rubber boot around the piston, take your time it will work. i didn't have to apply pressure the piston and i didn't have to fool with the emergency brake line.

P.S. There is a tool that you can usually borrow from your local autoparts store. It turns and presses the piston at the same time. I worked for three hours trying to get mine to compress and finally went to get the tool. It only took about ten mins per wheel after I had the tool. It is worth it. you could do it in their parking lot pretty much. ~good luck~

What is the value of a grade B?

The numerical value of a grade of B is 3.0 where an A is the highest value (4.0) and an F being the lowest (0.0).

When people are graded on a 1-100 point scale, B is usually considered from 80-89

What is the flow chart for newton raphson method?

You can find this charge by looking online. Many sites can help you to get the chart you need or explain how to make one.

Show that in any subtree of a max-heap the root of the subtree contains the largest value occurring anywhere in that subtree?

Let the root of the sub-tree be at some position a[i] in the array. From the max-heap property, A[i] >= A[j=2i], if node i has a left-child and A[i] >= A[k=2*i + 1], if node i has a right-sub-tree. But, A[j] >= A[2j], if node j has a left-child and A[j] >= A[2*j + 1], if node j has a right-sub-tree. Likewise, A[k ] >= A[2k+1)], if node k has a left-child and A[k] >= A[2*k +1], if node k has a right-sub-tree. The argument continues for all children in the sub-tree. Hence A[i], the root of the sub-tree, is larger than the value of any child in the sub-tree, so it contains the largest value in the sub-tree

Algorithm for reflection and translation for triangle in computer graphics?

//reflection for triangle

# include <iostream.h>

# include <conio.h>

# include <graphics.h>

# include <math.h>

char IncFlag;

int PolygonPoints[3][2] =

{{10,100},{110,100},{110,200}};

void PolyLine()

{

int iCnt;

cleardevice();

line(0,240,640,240);

line(320,0,320,480);

for (iCnt=0; iCnt<3; iCnt++)

{

line(PolygonPoints[iCnt][0],PolygonPoints[iCnt][1],

PolygonPoints[(iCnt+1)%3][0],PolygonPoints[(iCnt+1)%3][1]);

}

}

void Reflect()

{

float Angle;

int iCnt;

int Tx,Ty;

cout<<endl;

for (iCnt=0; iCnt<3; iCnt++)

PolygonPoints[iCnt][1] = (480 - PolygonPoints[iCnt][1]);

}

void main()

{

int gDriver = DETECT, gMode;

int iCnt;

initgraph(&gDriver, &gMode, "C:\\TC\\BGI");

for (iCnt=0; iCnt<3; iCnt++)

{

PolygonPoints[iCnt][0] += 320;

PolygonPoints[iCnt][1] = 240 - PolygonPoints[iCnt][1];

}

PolyLine();

getch();

Reflect();

PolyLine();

getch();

}

Is deleting the only node in linked list a special case?

It depends on whether or not you have a head node. If you do, then it is not a special case. If you don't, then it is, and you need to be able to update the head pointer.

Write a program wish the user depending on the time?

Here's a simple Python program that wishes the user based on the current time:

from datetime import datetime

current_hour = datetime.now().hour

if current_hour < 12:
    print("Good morning!")
elif 12 <= current_hour < 18:
    print("Good afternoon!")
else:
    print("Good evening!")

This program retrieves the current hour and prints a corresponding greeting: "Good morning!" for hours before noon, "Good afternoon!" from noon to 5 PM, and "Good evening!" after 5 PM.

What is socket programming in C?

There is nothing called "socket programming in C."

Sockets can be programmed in any programming language. What follows below is a basic idea on how to program sockets.

Socket programming refers to the use of a set of APIs for sending and receiving data over a network. The socket APIs originated on the BSD OS standardized by POSIX and are now found on UNIX, Linux, Windows, and Mac OS.

The concept of a socket is an abstraction for an end point in network communication through which data can be sent to and received from.

The major socket API functions are:

* socket() -- creates a socket of specified type and protocol * bind() -- assigns a local name or address to the socket (in the IP protocol this is usually an IP address and port * connect() -- connects a socket to a remote end point * listen() -- changes the socket's state to listen for incoming connections * accept() -- accepts an incoming connection and returns a new socket for communication over that connection * send() -- send data to remote end point specified with connect() call * sendto() -- in connectionless protocols such as UDP, sends data to a specified remote end point * recv() -- receive data from remote end point (after connection established) * recvfrom() -- receive data from a specified remote end point in connectionless protocol * getsockopt() -- gets current value for a particular socket option

* setsocketoption() -- set value of a particular socket option

Where can you get an stb file editor?

Where can you find a good bail bondsman for signal theft?

Why are individual records constantly raved about?

An excellent question and while not exactly a sociology major, I will try to answer. We live in a very competitive society. It is a part of our culture and nature to argue and discuss these things in an attempt to determine what or who is the best. We want to point our finger at something or someone and say they were "the best ever". Since the 'best' is a totally subjective conclusion, it conjures up discussion. And freedom of thought is never a bad thing. My feeling is that these records are a reflection of the era in which they were set and not a reflection of the game overall. Career records set by players like Cy Young (511 wins, 316 losses, 7356 innings pitched) or Walter Johnson (110 shutouts), by today's standards, will never be broken. They were set in what is called the 'Dead Ball Era'. Part of what fuels today's discussions about the career home runs record is that it will be set in what could be called the 'Steroid Era'. That means not only do we talk about the record but we talk about whether the person that breaks it was taking performance enhancing substances. I would be interested in hearing the opinions of other visitors here at WikiAnswers on this subject.

Why should indexes be used instead of subscripts to identify array elements?

You cannot uses indices instead of subscripts. The subscript operator [] requires an index in order to determine the subscript. Even if you don't use the subscript operator you still need an index to determine the offset of the subscript. Indeed, the only time you do not need an index is when traversing the array using a roving pointer, which is arguably more efficient than using a subscript to traverse an array since subscripts use multiplication instead of the much simpler increment/decrement operation.

What is local variables default value?

None. If you don't initialize them, you find garbage in them.

Relationship between actual and formal arguments?

The formal arguments are the names given to the parameters/arguments in the function declaration. These names will be used within the body of the function.

void myFunc( int i, char c ); // Function prototype

The actual arguments are the variables and/or constants (those supplied by the caller) that are used when invoking the function.

int intVar = 6;

char charVar = 'e';

// Actual parameters 3 and 'G' will be mapped to the

// formal parameters 'i' and 'c'

myFunc( 3, 'G' ); // Execute function

// Actual parameters 'intVar' and 'charVar' will be mapped

// to the formal parameters 'i' and 'c'

myFunc( intVar, charVar ); // Execute function

What is definition of file handling in c plus plus?

File is a place where information or data is stored.

we make use of some of the file-handling functions in c like:

fopen()-for opening a file.

fclose()-to close a file. Every file being opened for any operations like:

"r"- Read-Only mode.

"w"-Write-only mode.

"a"-append mode.

"r+"-read+write mode.

"w+"-write+read mode.

"a+"-read+append mode.

We should make use of FILE pointer ,in order to perform any such operations on the files.

There are many input and output functions used along with files.

fgetc()

fgets()

fscanf()

fputc()

fprintf()

fputs()

fseek()

rewind()

File handling is used to read or write a file without directly opening it.its contents are opened in another files by using above specified commands

in c++ programming for file handling we have to use a header file but in c noheader file regarding to file handling is required

How does 8 track continuous loop?

An 8-track tape is a magnetic audio storage format that uses a continuous loop of tape divided into four stereo programs, each lasting about 2-3 minutes. The tape moves continuously through the player, with a playback head that reads the magnetic signals on the tape. As one program ends, the player automatically switches to the next program by shifting the playback head to a different track. This design allows for uninterrupted listening without needing to rewind or change the tape manually.

What is Variable Scope?

The scope of a variable is the range, or area, in which a variable exists.

// this c is global and can be referenced from anywhere

int c = 1;

void foo() {

// this c is local to function foo and can't be referenced from the outside

int c = 2;

}

void bar() {

// if we try to reference c here, we get the value 1 from the global variable

}

Compare Do-While with While Statements?

A Do-While loop looks like this:

do {

loop body

} while (condition);

and a While loop looks like this:

while (condition) {

loop body

}

The main difference is that the loop body is always run once in the Do-While loop, then the condition is checked to see if the loop should keep running. In a While loop, the condition is checked first, and it will not run the loop body at all if the condition is false.

How do you swap two variables using a third variable?

Let us take a=40,b=50.Now after swapping,we should get the output as a=50,b=40.

main()

{

int a=40,b=50;

a=a+b;

b=a-b;

a=a-b;

printf("a=%d,b=%d",a,b);

}

What is high-level language compiled?

Compiling a high-level language means that the high-level source code (what is typed by the programmer) is being converted to machine code (binary, i.e. 0's and 1's) that the local computer can execute. In interpreter languages, the source code is first converted to byte code, which is either run directly (slower, but very portable), or interpreted by a virtual machine (see JVM) into machine code, and then executed (faster, but somewhat less portable). If an error is found the compilation stops and the errors are displayed.

What optional statement can be used in a case structure to execute statements when all other conditions are false?

default : <statement>;

i.e.

switch (value) {

case 1 : do_this(); break;

case 2 : do_that(); break;

default : do_whatever();

}