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

How many five digit hexadecimal strings are there?

Considering the lowest five digit hexadecimal number is 10000 (65,536) and the highest is FFFFF (1,048,575), there are 983,040 different hexadecimal numbers that are five digits.

What is fast code execution C language?

example:

int main (void) { puts ("That's all"); return 0; }

What is this percentd in C programming what does input and output mean How do I make the solution include decimal?

The %d designation is a printf format specification that says to interpret the next argument as a signed integer and display the results in base 10 decimal.

Input and output is the processing of input data and output data by your program. Usually, input is the stdin file, which is processed by scanf, and output is the stdout file, which is processed by printf.

To include a decimal point in the output, you need to use a floating point variable and a floating point specification, such as %f.

C program to print helical matrix?

//the following code will help you to write the program

for(i=n-1, j=0; i > 0; i--, j++) //n is the order of the square matrix {

for(k=j; k < i; k++) printf("%d ", a[j][k]);

for(k=j; k < i; k++) printf("%d ", a[k][i]);

for(k=i; k > j; k--) printf("%d ", a[i][k]);

for(k=i; k > j; k--) printf("%d ", a[k][j]);

}

m= (n-1)/2; //calculate the position of the middle element

if (n% 2 == 1) printf("%d", a[m][m]);//to print the middle element also

//9809752937(udanesh)

How do you swap two adjecent no in array in c?

Option 1) Use a temporary variable:

int x = array[i];

array[i] = array[i+1];

array[i+1] = x;

Option 2) Use bit operators:

array[i] ^= array[i+1] ^= array[i];

What is linked organization in data structure?

Linked organization in data structure is the organization of data records that are linked together by references. These links are also known as connectors.

What is C-language?

C language is a computer programming language, which allows one to develop programs for users.

you can learn more about C language here:

http://thetechnofreaks.com/2011/08/23/the-basics-welcome-to-the-world-of-programming/

What the five C's letter writing?

1. Clear

2.Correct

3.Concise

4.Complete

5. Courteous

Does the C plus plus programming language use a virtual machine?

No, it does not. But Microsoft Visual Studio 2008 allows you to connect to a virtual machine and run your projects "sandboxed".

Is there Triple DES c program source code?

There's a project that's implemented Triple DES in C over at SourceForge called "Easy Triple DES." It's in alpha, but should at the very least give you a head start. (See link.)

How I'm create source code in anci c?

C source files are plain text-files, so you can use any text-editor like NotePad, EditPad, and countless others.

How do you get input for an arithmetic operator in c?

Arithmetic operators take two inputs, one on either side of the operator. For instance, to add two numbers, say 2 and 5, either of the following expressions will work:

2+5

5+2

The result from this expression is "7", which must be used either in a function or variable assignment as follows:

int i=2+5;

This will not only declare variable "i", but initialize it to a value of "7".

For getting input from the user that can be used with arithmetic operators, the method will depend upon the interface you're using. If you're writing a console (text-only) application, scanf() and atoi() will work nicely:

int main()

{

int num1, num2;

printf("Enter the first number: ");

scanf("%d", num1);

printf("Enter the second number: ");

scanf("%d", num2);

printf("%d + %d = %d\n", num1, num2, num1+num2);

return 0;

}

Here, scanf() is used to read input from the user into two numbers. Then those two numbers are printed as well as the result of adding both of them.

See the related link below for more information on scanf() to read user input. If you're writing a graphical application, look on the Web for tutorials for the compiler (and supporting library) you're using to write your program.

How do you check a file is a binary or a text file through c programme?

There is no standard method of differentiating between the two because all files are binary files. Even text files must be binary encoded since that's the only encoding the computer can actually use. However, there are a few methods you can use to try and determine the encoding.

Text files only differ insofar as they only contain text (plain text) so one way we can differentiate is by examining the individual character values because there are certain characters we simply would not expect to find in a plain text file. All the ASCII control codes can be found in the range 0x00 through 0x1F (0 to 31 decimal) and the majority of these should not be present. The exceptions are 0x09 (horizontal tab), 0x0A (new line) and 0x0D (carriage return), all of which can reasonably be expected to be present in a text file.

However, plain text files may use other encodings besides ASCII. These alternative encodings typically use multi-byte encoding where a single character is composed from one or more bytes rather than just a single byte as with ASCII. These encodings are collectively known as UNICODE, however there are many variants, such as UTF-8, UTF-16, UTF-32 and so on. A UNICODE text file should (but doesn't always) include a byte order mark (BOM) at the start of the file. This is primarily used to determine if the multi-byte encoding is big-endian or little-endian but is also used to determine the specific encoding itself. So if the first few characters form a recognised BOM it is reasonable to assume (with a high degree of confidence) that the remainder of the file is multi-byte encoded text and the BOM itself will tell us precisely how to interpret it correctly.

The most common BOMs in use today are:

0xEFBBBF : UTF-8

0xFEFF : UTF-16BE (big-endien)

0xFFFE : UTF-16LE (little-endien)

0x0000FEFF : UTF-32BE

0xFFFE0000 : UTF-32LE

0xF7644C : UTF-1

0xDD736673 : UTF-EBCDIC

0x0EFEFF : SCSU

0xFBEE28 : BOCU

0x84319533 : GB-18030

UTF-7 has several BOMs, each of which begins 0x2B2F76:

0x2B2F7638

0x2B2F7639

0x2B2F762B

0x2B2F762F

0x2B2F76382D

When looking for a BOM, always look for the largest BOM first.

If there is no BOM present and the file does not appear to be ASCII plain text, there may be an HTML-style header at the start of the file that provides us the actual encoding. For instance, the following header tells us that this file uses UTF-8 encoding:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

UTF-16 and UTF-32 encodings that do not include a BOM or a plain-text header can often be deduced by examining all the null bytes (0x00) bytes in each group of two or four bytes. If the majority appear on either the odd or even bytes, then the encoding is probably UTF-16LE or UTF-16BE. Similarly with UTF-32 if the majority of odd or even pairs of bytes are 0x0000 (check for these before checking for UTF-16).

If none of these methods can determine the encoding, the best thing to do is alert the user that it is not possible to deduce the encoding, and perhaps allowing them to choose the correct encoding for themselves.

Note also that when presenting plain text, it is important that you also use the appropriate character set in combination with the correct decoding method. Even with the correct decoding method, the text may still appear garbled if the wrong characters are being represented.

Would you explain diff between int and integer?

In Java, int is a primitive data type that is used to hold numeric values. for example an int variable can be used to hold your age in a Java program.

Integer is the Wrapper class for the int data type. In Java there are a lot of in built features that work only on objects. under such circumstances we can wrap the primitive data type in its wrapper and use it.

For example:

int x = 10;

Integer xObj = newInteger(x);

if you want to know the value contained in xObj, then we use the method intValue().

xObj.intValue() would return the value 10 contained in it.

What are the merit and demerit of using friend function in c?

disadvantage of friend functions is that they require an extra line

of code when you want dynamic binding. To get the effect of a virtual friend,

the friend function should call a hidden (usually protected:) virtual[20]

member function.

Read more: Demerits_of_friend_function

Is there a 'c' code to generate the series a a b a b c?

#include <stdio.h>

int main (void) {

puts ("a a b a b c");

return 0;

}

How to prevent unauthorized memory access in c?

Make sure a password has been set on the computer and make sure its one that you know is easy to memorize but hard for others to find out. firewall - software firewall is a program that is stored into the computer which protects the computer from unauthorized incoming and outgoing data. virus protection program - that helps stop or detect and fix virus problems from happening.

Program to print sorting of an array?

For program in C language: http://wiki.answers.com/Q/Program_to_print_sorting_of_an_array_in_clanguage&updated=1&waNoAnsSet=2 Program in C++: #include #include void main() { int i,j,n,t,a[50]; clrscr(); cout"%d",&n; cout