If you know what BNF is:
Identifier -> Start Cont
Start -> letter | underline
Cont -> empty | (letter | underline | digit) Cont
How many formal parameters can be included in a function definition?
Zero or more. Note: if zero, write void: int foo (void)
How to write a C program for concatenation of two strings using stack?
#include
#include
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main(void)
{
string str1 = "nothing here";
cout << endl << "Enter a first string: ";
cin >> str1;
string str2 = "neither here";
cout << endl << "Enter a second string: ";
cin >> str2;
string srt = "result here";
cout << endl << "First string is: " << str1
<< endl << "Second string is: " << str2
<< endl << "Concatenation of two strings is: " << srt1 + str2
<< endl;
system("PAUSE");
return 0;
}
What are the differences between machine languages and high level languages?
Machine language is something which can be understood by machine(Computer), it can understand only 0 and 1 i.e. the binary code.
High level language is something which can be understood by human beings.. for ex... english.
Initialization is when you assign a value to a variable at definition. For instance...
int i = 123;
Assignment is when you assign a value to a variable at a later time. For instance...
int i;
i = 123;
Sometimes, automatic initialization (to zero) can occur without the explicit = clause, such as for file scoped variables, or for variables allocated through a debug allocator, but it is in bad form to depend on such values.
I would fire a programmer that repeatedly fails to initialize variables, and I would flunk a student that does the same.
What does a production operator do?
Generally operate machinery on a production line. It's a generic term covering a wide range of machinery and products.
Declare a numerical variable precise and initialize it to the value 1.09388641?
double precise = 1.09388641;
CAN Overloaded functions can return default values?
I'm not sure I understand you as it wouldn't make sense for a function to return a default value.
Do you actually mean can a function return an argument that has a default value? If so, then yes. Any argument passed to a function, whether defaulted or not, can be returned by the same function. If the argument is passed by value then you must return it by value. If passed by reference (which cannot be defaulted) then you can either return by reference or by value. However, if you pass by non-constant reference then you can just use the reference as an output argument, and use the actual return value for some other purpose, such as reporting any error condition(s) created by the function.
Overloaded functions are no different to ordinary functions, the only criteria is that each overload has an unique signature. The return value does not form any part of the signature, thus signatures cannot differ by return type alone.
How can you evaluate a expression?
replace the variables with the given values and simplify using the order of operations.
How do you write find out the power of a number without using operator and predefined functions?
With repeated multiplication.
Why cannot arrays be passed by values to functions?
Yes, if the programming language allows that, like most of high-level languages do. For example, in Java, arrays are defined by placing square brackets after type definition:
public int[] arrayOfIntegers = { 1, 2, 5, 10 };
public String[] someStrings = { "Hello", "World" };
public void thisMethodAcceptsArraysOfIntegers( int[] argument ) { }
public String andThoseStrings( String[] s ) { }
How do you check strings and pointers in C code?
Here is a page that will teach you about strings and pointers.
www.juicystudio.com/tutorial/c/strings.asp
Just saying String and Pointer don't actually aid us to describe what actually has to be answered .An Array is just repeatation of similar data types and String is as similar repeatation of continious characters in C. A String momentarily differs from a character array in terms of what the representations are for e.g. {'a','b','\0','i','s'}and{'a','b','\0','i','s','\0'}both are character arrays but in Ist "ab " is the string while in IInd "ab is" is as a whole is string for the string to be checked a ordidary way is to check the presence of the '\0' at last of its representation : Means :->check (Stringdef[i]!='\0')?HAS_MORE_CHAR:END_OF_STRING; for pointer validity:-> check (Ptr)?PTR_VALID:NOT_DEFINED; For more resurces just check any of the C material where the pointers are discussed and any misclearity mail me @ rupesh_joshi@sify.com,rupesh.joshi@gmail.com
How do you make a program net salary in c programming?
#include <iostream>
using namespace std;
int main()
{
double salary,n;
cout<<"enter number of salary:";
cin>>salary;
n=salary+0.03 ;
cout<<"the net salary is:"<<n;
cin>>n;
return 0;
}
Any identifier will do, there are no special rules for the names of the parameters.
eg:
int main (int argc, char **argv);
53 Cards in the Deck with the Joker (1)
54 Cards in the Deck with the Jokers (2)
In an if statement what must enclose the condition?
In an if statement, the condition must be enclosed in parentheses.