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 linker error?

An error detected (or perhaps caused) by the linker. Examples: unresolved symbol, duplicated symbol.

Difference between cin and scanf?

the getchar function waits the user hit a key followed by return key. Upon the return key hitted by the user the function returns the key. But the scanf can be used for various & different user entered data including text, integer, float and so on. in spite of getchar the delimeter keys for scanf function are tab, space and return key; so when a space entered by the user in the input the scanf will end the input and waits user enter the return key. You must take in mind that just the fragment of input that is behind these delimeters will be considered as legal input for the scanf and the remaninder will be escaped.

Which key element will be best for merge sort and why?

There is no key element in a merge sort. Unlike quick sort which requires a key element (a pivot) to recursively divide a subset into two subsets, merge sort simply divides a subset into subsets of 1 element and merges adjacent subsets together to produce sorted subsets. When there is only one subset remaining, the subset is fully sorted.

How do you get the gcf in c programming language?

Algorithm: to find HCF of two nos a, b 1. Find larger of two and let it l, smaller = s 2. divide l by s and find qotient (q) & remainder(r) 3. if r is 0 then s is the hcf 4. put l=s, s=r and go to step 2 int a, b; int l,s,q,r; if (a>b) {l=a;s=b;} else {l=b;s=a;} do {q= l/s; r=l%s; if (r != 0) {l=s;s=r} } while (r != 0); hcf=s; /* this variable to be output or returned as a function value as per programmer's convenience */

Who is the Str ongest DC Character?

Determining the strongest DC character can be subjective, as it often depends on the context and storyline. However, many consider Superman, especially in his most powerful forms, to be one of the strongest due to his incredible abilities like super strength, speed, and flight. Additionally, characters like Doctor Manhattan and the Presence, who possess omnipotent powers, could also be seen as the strongest in terms of sheer capability. Ultimately, strength in the DC universe can vary greatly depending on the narrative.

What is the difference between program and programming?

define program

i. program means set of instruction which are required for a particular type of task is called program

ii. set of instruction or commands which are given for the computer to do different activity or jobs or works is called program

define programming

the process of creating/modifying a program; some people's job, others' hobby

Who is John c?

The most amazing person in the world. And his friend is Justin, Gerell, and Kristie :)

What is meant by TSR in C?

It means Terminate-Stay-Resident. A TSR is a program that remains in memory when the program ends.

What is the structure of the katipunan?

Structure of Katipunan

The structure of Katipunan reveals that it was greatly influenced by Masonry as to initiation rites, and by Rizal's La Liga Filipina as to organization. Structurally, the society had 3 governing bodies- the Kataastaasang Sanggunian or Supreme Council, the Sangguniang Bayan or Provincial Council and the Sanggyniang Balanggay or Popular Council. Kataastaasang Sanggunian is the highest governing bodyof society. Sangguniang Bayan and Sangguniang Balanggay represents the province and municipality or town.

Judicial matters affecting the members of the society were referred to as sort of court known as the Sangguniang Hukuman or Judicial Council. During its existence, the Judicial Council had not passed the death sentence on any member. But a secret chamber, composed of Bonifacio, Jacinto, Valenzuela srntenced some members to be expelled for having allegedly violated the secrets of the society.

Why a In the linked list structure Overflow can never occur unless the memory is actually full?

That's not quite true...

It is true that overflow in a linked list structure can not occur so long as there is at least one chunk of allocatable memory large enough to hold one element.

It is not true, however, that overflow can nover occur unless memory is actually full. This is because you can still have allocatable memory, while not having any contiguous chunks large enough to satisfy a single request.

How do you write a c program to accept 20 characters and display whether each input given is a digit a lower case or upper case using only arrays and while loops and for loops?

#include<stdio.h>

bool is_digit (char c) {

return (c>='0' && c<='9');

}

bool is_upper (char c) {

return (c>='A' && c<='Z');

}

bool is_lower (char c) {

return (c>='a' && c<='z');

}

int main () {

char input[20];

printf ("Enter a 20 character string containing digits and letters: ");

scanf ("%s", &input); /* beware of buffer overflow */

for (int index=0; index<20; ++index) {

printf ("The character at index %d is ");

if (is_digit (input[index]))

printf ("a digit.\n");

else if (is_upper (input[index]))

printf ("an uppercase letter.\n");

else if (is_lower (input[index])) printf ("a lowercase letter.\n");

else

printf ("a non-alphanumeric character.\n");

}

return 0;

}

What are the merits and drawbacks of using a person's foot as a standard?

The merits of a person's foot, you can use it anytime and anywhere, not unlike bringing lots of materials. But avoid your carelessness on using your foot. Because sometimes some people are not much accurate. So when they're measuring using their foot, the measurement might be not exact. Remember, even the greatest falls with this kind of measurement

What is minimal language?

Minimal language is considered to be part of the most important elements of communication. This works hand in hand with sensory organs and is said to be the primary language of communication.

What do the c and v in argc and argv stand for?

The letter "c" in argc stands for count. The letter "v" in argv stands for vector. You can visit this website for more info.......... http://www.dgp.toronto.edu/~ajr/209/notes/argv.html

What is the BNF of the for loop?

FOR ::= for ( [EXPRESSION]; EXPRESSION;[EXPRESSION]) STATEMENT

note: FOR itself is a STATEMENT as well:

STATEMENT ::= ...| IF | ELSE | WHILE | FOR | ... | EXPRESSION; | EMPTY_STATEMENT; | COMPOUND-STATEMENT | ...

Does each node in a doubly linked list contain a link to the previous as well as the next node?

Yes, each node in a doubly linked list contain a link to the previous as well as the next node. That is the definition of the doubly linked list.

What are the salient features of control array?

A control array is a collection of controls, such as buttons or text boxes, that share the same properties and event handlers in a programming environment, allowing for efficient management of similar user interface elements. Key features include the ability to dynamically add or remove controls at runtime, centralized handling of events for all controls in the array, and reduced memory usage by minimizing redundancy. This structure simplifies code maintenance and enhances readability by grouping related controls together.

How do you sort rocks?

You sort them by rocks, minerals, and fossils.

What is difference between Deep copy and shallow copy?

A "shallow" copy is when the member values are physically copied from one

object to another, *including* the values of any pointer or reference

members. If there are pointer or reference memebrs, then, those poointers

or references refer to the *same* objects as the original object, which is

usually a bad thing. That's why you want to define a copy constructor and

assignment operator for objects that contain pointers or references.

It's called a "shallow" copy because only the values of the

pointers/references are copied, instead of making copies of those

referred-to objects and setting pointers to them. *That* is what would be

called a "deep" copy, because it's going "deeper" into the structure,

copying everything, not just the first "layer".

Creating a notepad using c?

Hello Guys , Creating Notepad in C Langauge is too much easy . It's Just Fun...!

#include<stdio.h>

#include<conio.h>

int main()

{

FILE *open; //use to open file pointer//

//File_txt is created

opn=fopen("C:\\filename.txt" ,"w") \\use "w" for creating a file//

fclose(opn);

getch();

}