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 peep stack?

It is the space between the balls and the penis!!

Distance vector routing in c program?

#include<stdio.h>

int main()

{

int n,i,j,k,a[10][10];

printf("\nEnter the number of nodes: ");

scanf("%d",&n);

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

{

printf("\nEnter the distance between the host %d%d:", i+1,j+1);

scanf("%d",&a[i][j]);

}

}

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

printf("%d\t",a[i][j]);

printf("\n");

}

for(k=0; k<n; k++)

{

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

{

if(a[i][j]>a[i][k]+a[k][j])

a[i][j]=a[i][k]+a[k][j];

}

}

}

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

{

b[i][j]=a[i][j];

if(i==j)

b[i][j]=0;

}

}

printf("\nThe output matrix is:\n");

for(i=0;i<n;i++)

{

for(j=0;j<n;j++)

printf("%d\t",b[i][j]);

printf("\n");

}

return 0;

}

How do you terminate statements in C?

All statements must be terminated with a semi-colon in C.

Can you void a disclaimer once signed?

Once a disclaimer is signed, it generally cannot be voided unilaterally. However, it may be challenged or deemed unenforceable under certain circumstances, such as if it was signed under duress, fraud, or if the terms are found to be unconscionable. Additionally, parties may mutually agree to rescind the disclaimer. It’s advisable to consult a legal professional for specific situations.

Why is delete function slow?

You computer might be virus-infected.

What is quality program?

Quality programs are tools that allow you to improve the Quality of your product.

There are two types of quality programs.

  1. A Quality Process or Standard
  2. Quality Assurance Software

Most reputable Software Quality Assurance Tools have at least some components of a quality system or standard.

You may have heard of a Bug Tracking System. This type of software is used to manage "bugs" that usually crop up during development and even after a software was released to the public. It helps you track bugs and assign the analysis and fixing to a development team member.

There's another more advanced type of quality software that is usually referred to as Issue or change management software. I've often heard it called a Program Support Log. It's usually more robust in terms of risk analysis and should include the ability to identify areas an Issue or Change can impact should it become an incident. For this reason, it's usually more proactive than a bug tracking system.

Here is a very broad definition of a Bug:

It is something technical in nature that is either not functioning or is functioning in an unexpected manner. Not everything that is identified as 'bug' will be a technical error. It could be an inquiry on a technical matter or a request for technical support. There are three types of bugs:

  1. Support -- A request for technical help on a particular matter.
  2. Error -- A technical problem.
  3. Enhancement -- a request for a change in how something functions. This should trigger a Change Request in your organization.

A Program Support Log (Change or Issue management software) is much better at tracking and controlling unplanned events that can and in almost all cases do crop up. Things or events that can blindside you. The ability to discuss issues before they become incidents is also usually present in this type of software. There are 4 types of Incidents:

  1. A Risk is something negative that may happen.
  2. An Issue is something that has to be done but there is not a final decision on what to do.
  3. A Change Request is seeking permission for a specific course of action which will change the project's schedule, cost or functionality.
  4. A Discussion Item usually precedes a categorization of an Issue, Risk, or Change request.

I've worked in a few Software firms where they used Issue Management software to manage bugs only because it allows you to be more proactive, and brings more intelligence to the whole Quality Assurance process.

Did the stock on a Model 50 270 caliber J C Higgins 58395 come with checkered engraving and a cheek plate?

I just inherited my Dads J.C. Higgins Model 50 583.91 and I can remember saving my money,along with my brothers,and mother to get him that gun. We bought it in 1950 for 88.00 dollars, To answer your question ,no it did not have any frills no engraving no cheek plate,it didnt even have a recoil pad. There is a good article about that model in Guns and Amo by Payton Miller. hope this helps.

Is merge sort external sorting?

Can be. (Meaning: you can merge sorted files without loading them entirely into the main memory.)

Sum of digits of number using function using c?

int digsum (int n)

{

if (n<10) return n;

else return (n%10) + digsum (n/10);

}

How many bytes are occupied by declaring following array of characters?

A single-byte type of array has 1 byte per character; a wide-character array has 2 bytes per character of storage. Without seeing the exact definition it cannot be determined what the actual size of the array would be.

Is a header file a collection of built in functions that help in writing c programs?

No. There are no built-in functions in C, there are only built-in types and built-in operators for those types. All functions are user-defined, including those defined by the C standard library. There are no user-defined operators in C, but you can implement operators as named functions if required.

A header file (*.h file) typically contains a group of related user-defined function and/or user-defined type declarations which can be included in any source file that requires them. Every user-defined function or user-defined type name used by a program must have one (and only one) definition, usually contained in a corresponding source file (*.c file) or library file (*.lib file). Built-in types and their corresponding operators do not require a header file since they are part of the language itself (hence they are built-in).

How do calculate the size of an 40GP?

you have to get 40gp and divide it by the amout of your hard disk and then multiply the amout of your internet speed

How do you answer application questions?

Give an example of a situation where you had to work with others to achieve a common goal and how you achieved this

Why is casting from a base class object to derived class object is unsafe. explain with examples?

Casting from a base class to a derived class is dangerous because a base class may not always have all the variables a derived class will.

If you have a base class Foo with the following declared variables:

int x;

int y;

int z;

and a class derived from Foo called Bar with the following declared variables:

int a;

int b;

int c;

and you cast Foo to Bar, the memory for the extra 3 variables a, b, and c have not been set aside. So when you try to modify a, b, or c you will corrupt data and will possibly crash your program because you're touching memory that's not really yours. However, casting Bar to Foo is okay because Bar includes all the variables Foo has laid out the same way in memory. You just won't be able to access a, b, and c using a Foo pointer even though they'll be there.

What is return value 1?

Return value 1 from a function is a true value and generally means success.

Return value 1 from the outermost function, i.e. to the shell, however, is a failure indication, and the value is dependent on the design of the code.

In other words: context-dependent, always consult the documentation.

Can you give me an example a program of turbo c that determine a zodiac sign?

#include <stdio.h>

int main()

{

int month,date;

printf("Enter the month and date of your birth in the format mm-dd:\n");

scanf("%d-%d",&month,&date);

if(month<1month>12date<1date>31) {

printf("That is not a valid date.\n");

return 1;

}

printf("Your zodiac sign is ");

switch(month) {

case 1:

if (date<20) printf("Capricorn\n");

else printf("Aquarius\n");

break;

case 2:

if (date<19) printf("Aquarius\n");

else printf("Pisces\n");

break;

case 3:

if (date<21) printf("Pisces\n");

else printf("Aries\n");

break;

case 4:

if (date<20) printf("Aries\n");

else printf("Taurus\n");

break;

case 5:

if (date<21) printf("Taurus\n");

else printf("Gemini\n");

break;

case 6:

if (date<21) printf("Gemini\n");

else printf("Cancer\n");

break;

case 7:

if (date<23) printf("Cancer\n");

else printf("Leo\n");

break;

case 8:

if (date<23) printf("Leo\n");

else printf("Virgo\n");

break;

case 9:

if (date<23) printf("Virgo\n");

else printf("Libra\n");

break;

case 10:

if (date<23) printf("Libra\n");

else printf("Scorpio\n");

break;

case 11:

if (date<22) printf("Scorpio\n");

else printf("Sagittarius\n");

break;

case 12:

if (date<22) printf("Sagittarius\n");

else printf("Capricorn\n");

break;

}

return 0;

}

What are drawbacks?

Drawbacks are referred to as features that will make something less acceptable. This is commonly known as setbacks, snags, stumbling blocks and so on.

How do you merge 2 Visual C programs to get a single output?

You cannot. A C program can only have one global main function but you'd be trying to compile a program that has two main functions. The only way to merge the two programs is to modularise both programs so that neither is dependent upon their main functions. Once modularised, you can include those modules in any program. Alternatively, you can create binary libraries from the modules and link them into any program.

How do you determine which is outer loop or inner loop of the Baltimore beltway?

The outer loop goes counter clockwise, while the inner loop goes clockwise. For example, if you're driving from Fairfax, VA to Washington, DC you're going on the inner loop, and on the way back you're taking the outer loop.

What is the term for a group of one or more C statements enclosed in braces?

The term for a group of one or more C statements that are enclosed in braces is called a command block. A command block is a block that is made with the intent to support adventure mode.