What is a return statement used for?
It means end the function. Functions automatically end when execution reaches the end of the function, but you can return from a function at any point within the function with a return statement.
If the function returns a value to its caller, you must provide a reachable return statement along with the value you wish to return.
Whose variables are also known as global variables?
The variables which are declared outside the main() function is known as global variables and they can be used anywhere in the program.
And,
the variables which used declare inside the main() function is known as local variables and they can be used inside the main() function only.
Example:
#include<stdio.h>
#include<conio.h>
int x,y; // global variables
void main()
{
int a,b; // Local variables
------------
----------------------
---------------------
getch();
}
Which end C terminus and N terminus is important to the protein Activity?
To set a target protein in the cell
How do you reference a array from one function to another?
number = myfirstfunction (text, freq); // The first function, where "text" is a string, // and "freq" is the array that is filled with data mysecondfunction (number, freq); // The 2:nd function where the value from the previous // function is being used, and the array "freq" is // bring printed.
What are Short circuit operators in c language?
&& and are short circuit operator in C.
It means that expressions chained with these operators are only evaluated until the result is unambiguously determined. For example, the expression a && b is guaranteed to be false if a is false. In this case, the term b is not evaluated, and any possible side-effects of b will not occur. The logical OR () is implemented in a similar fashion: c d is guaranteed to be true of c evaluates to true, and d is not being evaluated in this case.
The ternary ? operator is not a short circuit operator (this was listed as a short-circuit operator in a previous revision of this answer). An expression that uses the ternary operator, for example e = f ? g : h is nothing but an alternative form of an if-else construct. The terms f, g and h may each contain short-circuit operators and be evaluated in the manner discussed above, but the ternary operator itself has no short-circuit characteristic.
What is the value of a modified DD 45 caliber Cobray?
I paid $99.00 used in good condition for mine 12/06/07.
Is macro a recursive function?
If you're asking if the c preprocessor supports recursive macros, the answer is no. The preprocessor is single-pass and since the "function" must be defined before it can be referenced, it can not be recursive.
Give an example of how getchar function is used in C program.?
The getchar() function is used to read a single character from standard input (stdin) and increment the associated file pointer to point to the next character. The return value is an integer which must be cast to a character.
An example demonstrating its usage is shown below.
#include <stdio.h>
int main()
{
char buffer[81];
int i, ch;
for(i=0; (i<80) && ((ch = getchar()) != EOF) && (ch!='\n'); ++i)
{
buffer[i] = (char) ch; // cast input to a character
}
buffer[i] = '\0'; // add null-terminator.
printf( "You entered: %s\n", buffer);
}
Describe about storage allocation and scope of global extern static local and register variables?
Global Varible:
The variable which is declared as "Global" one : having the preveleges to use and access that variable in any class and object( means any where in the program) just like PUBLIC keyword in OOPS concepts.
Static Variable :
If we declare a variable as Static , then it wont have the permission to access that variable through out the program and u have to use it inside the class or object which u declared itself.
All the Best
Annapurna
What is the value of a Taurus pt 247 PRO C DS 45 cal?
I would pay $1000 for this Pro Conceal .45 acp!
Why strcat(string'!') not work in C program?
The strcat() function has the following protocol:
char* strcat (char* destination, char* source);
The function appends the source string to the destination string and returns the destination string.
The destination string must be a null-terminated character array of sufficient length to accommodate strlen (source) plus strlen (destination) characters, plus a null-terminator. The existing null-terminator and subsequent characters of destination are overwritten by characters from the source string, up to and including the source string's null-terminator.
strcat (string, '!') will not work because '!' is a character literal (ASCII code 33 decimal), not a null-terminated character array. Use "!" instead of '!'.
Example:
char string[80]; // character array
strcpy (string, "Hello world");
strcat (string, "!");
puts (string);
Write a program to change the case of the given string?
This functionality is already in Java. String.toLowerCase() and String.toUpperCase() will take care of it for you.
Why are few programs written in binary form?
The lower-level the language, the harder it is to write programs in. It takes a long time to write a program in machine language...and it is way more trouble than writing it in an abstracted language.
Write down the algorithm to delete a node from doubly linked list whose data item is given?
1. Find the element is the list. Let pointer 'p' point to it.
2. Delete it from the list:
if (p->Prev) p->Prev->Next = p->Next;
else List->First = p->Next;
if (p->Next) p->Next->Prev = p->Prev;
else List->Last = p->Prev;
3. Release the memory associated with it.
C progamme for conversion of Celsius to Fahrenheit using array?
main void void void (void)
{ float temp1 [13]= {1,4,2,3,4,5,7,88,9,4,3,23,12};
How are default parameters useful?
C itself does not support default values for function arguments, if that is your definition of parameter.
In languages that do, like C++/python/ and Java (presumably) you can use default parameters as a rudimentary form of polymorphism in the sense that you can call the function or method with a minimal set of arguments assuming the that others are defaulted to the values you want, this can be actual defaulted values like the number -1, or sentinel values that omit functionality in the function/method you are calling.
You will, in most of these languages that support this, have to arrange the position of the defaulted arguments to the end of the argument list, and in doing so it would be best to prioritize them from least likely to use the default value to the most from left to right. This in design time can conflict with function/method overloading where you vary the number of arguments in the prototypes of your overloaded function, so I consider these two features of a language mutually exclusive, i.e. don't use them together unless you have a good reason.
This feature is rarely useful but in saying "rarely" when it is, it is the most helpful. I find it and so do the creators of the C++ libraries helpful for class constructors when sometimes you need to set some internal features during construction time.
What are the logic formulation?
1. who are the people involved in programming?
2. tell us about logic formulation.
i hopr that you will answer my questions.
Maybe the right question is "What is a Logic Formulation". I would like to give my view on this.
Perhaps, the best way to understand "logic formulation" is by first knowing what "logic" is. In philosophy "logic" can be discussed endlessly but in so far as computer science is concern what we actually need is a simple application of it. Let me define "logic" as the grammar of correct thinking and reasoning. Take note of the conjunctive word "and" in the definition. Hence, two important elements must conform to define logic and that is (1) to think correctly and; (2) to reason out correctly. If one of the elements would be missing then no logic can be derived from.
The importance of logic in computer science is not as complicated as one might think of it philophically. Its use in programming is only for the purpose of bringing your instructions into proper order. Other than that, no further deductions or inference is needed. In writing instructions for the computer you have to take the individual steps comprising of the whole act to attain the desired results. Computer don't possess inherent power of thinking as human would demonstrate in the conduct of his task. Thus, each step must be taken and arranged according to the order of their priorities. These individual steps will make the instructions needed by the computer to execute its task. Each individual step is known as ALGORITHM.
Let us "MAKE COFFEE" to further illustrate this. When you want to make a coffee there are certain steps you need to do and so you can sip it in the end. Even us, human, cannot take all the steps at one time just to make coffee. Much so if computer is to make it for you. Computers works faster than human but despite of that tremendous speed computers will still take your instructions one at a time. So what are the steps in doing a cup of coffee? Let us consider:
As you can see, the above steps are arranged in LOGICAL order. Some of the steps like the 2nd to the 4th steps maybe interchanged without affecting the LOGICAL process but not steps 1, 5 and 6. But just to satisfy your curiosity try to do step 5 as your first step or perhaps 6th as your first. I just wonder what will become of your coffee as what would become of you in the face of those people watching you.
Clearly LOGIC FORMULATION simply means bringing the steps as required by the task in PROPER ORDER so that when it is executed procedurally the desired result is achieved according to the required output specification.
-Nilo M. Padre
How can you write TSR using C?
printf("TSR");
If you are talking about a terminate and stay resident DOS program, the easiest way to write a TSR is to use a TSR toolkit, which does all of the basic work for you. Otherwise, even to describe the process would take too long (it can be quite complex).