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 null derivative?

A null derivative occurs when an increasing function does not have a derivative. This is most commonly seen in the question mark function.

What is the Difference between Peterson's algorithm and Dekker's algorithm?

Dekker algorithm has much more complex code with higher efficiency, while Peterson has simpler code. Imran

Dekker algorithm has also the disadvantage of being not expendable (maximum 2 processes mutual exclusion, while Peterson can be extended for more then 2 processes.

more info here:

http://en.wikipedia.org/wiki/Peterson%27s_algorithm#The_Algorithm_for_more_then_2_processes

What is indenting business?

An indenting business is a company that earns commissions on sales without buying or reselling anything. Some examples include businesses that specialize in technical support, distribution, shipping, importing or exporting, marketing, etc.

What is strong number n Armstrong number in C language?

Strong number:-

The sum of the factorials of digits of a number is equal to the original number.

Ex: n=145=> 1! + 4! + 5! = 1 + 24 + 120 = 145

so it is strong number.

Armstrong number:-

The sum of the cubes of digits of a number is equal to the original number.

Ex: n=153 => 13 + 53 +33 = 1+125+27= 153

so 153 is arm strong number.

C program for strong numbers

#include

#include

void main()

{

int sof=0,n,dn,ctr,prod,rem;

printf("Enter the number\n");

scanf("%d",&n);

dn=n;

while(n!=0)

{

prod=1,ctr=1;

rem=n%10;

while(ctr<=rem)

{

prod=prod*ctr;

ctr=ctr+1;

}

sof=sof+prod;

n=n/10;

}

if(sof==dn)

{

printf("The number entered is strong number");

}

else

{

printf("The number entered is not a strong number");

}

}

C program for amstrong numbers

#include

#include

void main()

{

int dn,rem,sum,n;

printf("Enter the number:");

scanf("%d",&n);

for(dn=n,sum=0;n!=0;rem=n%10,sum=sum+rem*rem*rem,n=n/10);

if(dn==sum)

printf("Amstrong number");

else

printf("Not a amstrong number");

}

By Nagarjuna ECE

sri indu,

IBP

7 D in a P N?

GOT MILK GOT MILK GOT MILK GOT MILK GOT MILK GOT MILK GOT MILK 7 digits in a phone number

Difference between program counter and instruction pointer?

There isn't any difference. Two different words forexactly same thing. Third way to call it is instruction address register.

Solution of compilers principles techniques and tools?

Describe the languages denoted by the following regular expressions:

a) a(a|b)*a.

b) ((e|a)b*)*.

c) (a|b)*a(a|b)(a|b).

d) a*ba*ba*ba*.

!! e) (aa|bb)*((ab|ba)(aa|bb)*(ab|ba)(aa|bb)*)*.

What is the difference between a bi pap and a c pap machine?

the bi pap has oxygen added to the air where as the c pap has just compressed room air I am very sorry to have to do this, but the above answer is incorrect. I am fully aware of the function of bi-pap and c-pap systems, as I live with one every night, and have researched the technologies in depth. A c-pap machine provides a constant air pressure to the mask of the wearer, whether they are breathing in or out. A bi-pap machine provides one pressure on inhale (higher pressure) and another (lower pressure) on exhale. Either of these machines can be used with or without oxygen added. Likewise, either machine can be run with added humitity. A c-pap machine is more difficult to get used to than a b-ipap macchine, since you are exhaling against a greater pressure with a c-pap unit. A bi-pap unit senses your breathing, and reduces its pressure as soon as you start exhaling. I use a bi-pap machine, and it is very comfortable to use. I have never been able to get used to a c-pap machine; I can't exhale against the pressure. The main reason why everyone doesn't use a bi-pap machine is the cost - thousands of dollars for a bi-pap machine versus hundreds of dollars for a c-pap machine.

What is Code segment in C program?

A code segment, also known as the text segment holds all the executable instructions of the process. The text segment usually starts from the lowest address space of the process memory (leaving behind a small unmapped memory ..not mapped to a physical memory)

--Vivek Purushotham

(vivek.purushotham@gmail.com)

How will you select the test case for regression testing?

The selection of test cases for regression testing:

  1. Requires knowledge on the bug fixes and how it affect the system
  2. Includes the area of frequent defects
  3. Includes the area which has undergone many/recent code changes
  4. Includes the area which is highly visible to the users
  5. Includes the core features of the product which are mandatory requirements of the customer
Selection of test cases for regression testing depends more on the criticality of bug fixes than the criticality of the defect itself. A minor defect can result in major side effect and a bug fix for an Extreme defect can have no or a just a minor side effect. So the test engineer needs to balance these aspects for selecting the test cases for regression testing.

Read the Complete article at:
http://www.onestopsoftwaretesting.com/2009/10/selecting-test-cases-for-regression.html

Write a C program to accept 10 numbers and find the sum and average?

#include

using namespace std;

int main()

{

int numberOfElemenets = 10;

double myArray[numberOfElements] = {0.0};

double sum = 0;

for (int index = 0; index < numberOfElements; index++)

{

cout << "Enter " << (index + 1) << " number: ";

cin >> myArray[index];

}

for (int index = 0; index

{

sum += myArray[index];

}

cout << "\nSum of all elements: " << sum << endl;

cout << "Avarage is: " << (sum/numberOfElements) << endl;

return 0;

}

What is the Difference between data buffering and busing structures?

data buffering is the method to smooth the traffic flow or to control the bottle neck. it reduce the speed gap between memory access for instruction or data fetch or execution in instructional pipeline.

whereas, in pipelines sometime one instruction depends on other, and which sometimes causes conjection and bottle neck problem, so control this problem we use busing structure

A program which convert English language to Assamese language in c program?

No. There is not any program or software.

B'coz language is such a vast thing.

It needs lots of efforts and knowledge about d specific language.

Translator by Google is provided for some famous languages only.

What are the most common syntax errors in LISP programs?

Incorrect placement or number of parentheses will probably make the most common syntax error in LISP programs.

What is Difference between local variable and data members or instance variable?

A data member belongs to an object of a class whereas local variable belongs to its current scope. A local variable is declared within the body of a function and can be used only from the point at which it is declared to the immediately following closing brace. A data member is declared in a class definition, but not in the body of any of the class member functions. Data members are accessible to all member function of the class.

Difference between pointer to constant and constant pointer?

1. pointer to a constant means you can not change what the pointer points to

2. constant pointer means you can not change the pointer.

Difference between array processor and multiprocessor?

an array processor can handle multiple data elements simultaneously,in a parallel fashion, but a multiprocessor handle multiple processes simultaneously which may include more than one data element in each process...

An array procesor is optimized for array operations, has its own set of instructions, large memory block moves, logical operations on many array elements, etc and may itself be multi-processor or massively parallel. It has an interface where a host loads memory locations with the array to be processed (or perhaps a data file), then the array processor uses its specialized structure to do what was asked of it on the array, then tell the host is done and the result may be found in memory locations or perhaps a data file. Many of the jobs supercomputers do are array operations, the specialized capabilities can cost thousands of dollar per CPU second but they can do array operations that might take years for slower general purpose computers.

An array procesor can also be smaller, a graphics processor handling the video display is an array processor.

A typical operation is move the image to the right, move all the pixels to the right..

A general purpose computer may be multi-processor (Intel's multi-core).