Write EBNF decribtion for C float literal?
Convertible string := <significand><exponent> <significand> := [<sign>]<digits>[.<digits0>] <exponent> := E[<sign>]<digits0> <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
Writes a c program to find the sum of all integers between 1 and n?
Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11
Key datastructure is a data statucture or container which keeps key value pair. For a search the key is passed to check that the key is present in DS or not.
Disadvantages of using e-commerce?
Disadvantages And Constraints
Some disadvantages and constraints of e-commerce include the following.
Time for delivery of physical products .
It is possible to visit a local music store and walk out with a compact disc, or a bookstore and leave with a book. E-commerce is often used to buy goods that are not available locally from businesses all over the world, meaning that physical goods need to be delivered, which takes time and costs money. In some cases there are ways around this, for example, with electronic files of the music or books being accessed across the Internet, but then these are not physical goods.
Physical product, supplier & delivery uncertainty
When you walk out of a shop with an item, it's yours. You have it; you know what it is, where it is and how it looks. In some respects e-commerce purchases are made on trust. This is because, firstly, not having had physical access to the product, a purchase is made on an expectation of what that product is and its condition. Secondly, because supplying businesses can be conducted across the world, it can be uncertain whether or not they are legitimate businesses and are not just going to take your money. It's pretty hard to knock on their door to complain or seek legal recourse! Thirdly, even if the item is sent, it is easy to start wondering whether or not it will ever arrive.
Perishable goods
Forget about ordering a single gelato ice cream from a shop in Rome! Though specialised or refrigerated transport can be used, goods bought and sold via the Internet tend to be durable and non-perishable: they need to survive the trip from the supplier to the purchasing business or consumer. This shifts the bias for perishable and/or non-durable goods back towards traditional supply chain arrangements, or towards relatively more local e-commerce-based purchases, sales and distribution. In contrast, durable goods can be traded from almost anyone to almost anyone else, sparking competition for lower prices. In some cases this leads to disintermediation in which intermediary people and businesses are bypassed by consumers and by other businesses that are seeking to purchase more directly from manufacturers.
Limited and selected sensory information.
The Internet is an effective conduit for visual and auditory information: seeing pictures, hearing sounds and reading text. However it does not allow full scope for our senses: we can see pictures of the flowers, but not smell their fragrance; we can see pictures of a hammer, but not feel its weight or balance. Further, when we pick up and inspect something, we choose what we look at and how we look at it. This is not the case on the Internet. If we were looking at buying a car on the Internet, we would see the pictures the seller had chosen for us to see but not the things we might look for if we were able to see it in person. And, taking into account our other senses, we can't test the car to hear the sound of the engine as it changes gears or sense the smell and feel of the leather seats. There are many ways in which the Internet does not convey the richness of experiences of the world. This lack of sensory information means that people are often much more comfortable buying via the Internet generic goods - things that they have seen or experienced before and about which there is little ambiguity, rather than unique or complex things.
Returning goods
Returning goods online can be an area of difficulty. The uncertainties surrounding the initial payment and delivery of goods can be exacerbated in this process. Will the goods get back to their source? Who pays for the return postage? Will the refund be paid? Will I be left with nothing? How long will it take? Contrast this with the offline experience of returning goods to a shop.
Privacy, security, payment, identity, contract.
Many issues arise - privacy of information, security of that information and payment details, whether or not payment details (eg credit card details) will be misused, identity theft, contract, and, whether we have one or not, what laws and legal jurisdiction apply.
Defined services & the unexpected .
E-commerce is an effective means for managing the transaction of known and established services, that is, things that are everyday. It is not suitable for dealing with the new or unexpected. For example, a transport company used to dealing with simple packages being asked if it can transport a hippopotamus, or a customer asking for a book order to be wrapped in blue and white polka dot paper with a bow. Such requests need human intervention to investigate and resolve.
Personal service .
Although some human interaction can be facilitated via the web, e-commerce can not provide the richness of interaction provided by personal service. For most businesses, e-commerce methods provide the equivalent of an information-rich counter attendant rather than a salesperson. This also means that feedback about how people react to product and service offerings also tends to be more granular or perhaps lost using e-commerce approaches. If your only feedback is that people are (or are not) buying your products or services online, this is inadequate for evaluating how to change or improve your e-commerce strategies and/or product and service offerings. Successful business use of e-commerce typically involves strategies for gaining and applying customer feedback. This helps businesses to understand, anticipate and meet changing online customer needs and preferences, which is critical because of the comparatively rapid rate of ongoing Internet-based change.
Size and number of transactions.
E-commerce is most often conducted using credit card facilities for payments, and as a result very small and very large transactions tend not to be conducted online. The size of transactions is also impacted by the economics of transporting physical goods. For example, any benefits or conveniences of buying a box of pens online from a US-based business tend to be eclipsed by the cost of having to pay for them to be delivered to you in Australia. The delivery costs also mean that buying individual items from a range of different overseas businesses is significantly more expensive than buying all of the goods from one overseas business because the goods can be packaged and shipped together.
False. In a binary search, if the search fails on the first trial of an array of 1000 elements, then there are only nine more elements left to search.
What is the array function in CAD?
there r 2 types of array in cad - rectangular array and polar array...........
What is the difference between handles and pointers?
They exist in different contexts. Handles are like... well handles (or keys, tickets, references etc), to access objects (like files, sockets, resources) you have opened (created, allocated, etc); in the program they can be integers or pointers.
Advantage of bzip2 compression algorithm over other algorithms?
Archives are smaller than with gzip. Compression requires more resources though.
How do you write a looping program to check whether input is a buzz number or not?
Buzz numbers are aircraft identification numbers that were applied to American aircraft following the second world war and through the 1960's.
To determine if an input is a buzz number or not, the input must consist of a two- or three-letter manufacturing code and a 3-digit number, separated by a hyphen. The digits are generally the last three digits of the aircraft serial number.
Validating the manufacturing code is relatively simple given there were only 173 issued. However, validating the three-digit code would be impossible without a complete list of all aircraft that were assigned a buzz number. If such a list exists, storing them in sequential order would allow your program to perform a fast binary search to determine if the input were valid or not. In the absence of such a list, the manufacturing code alone would at least tell you which type of aircraft the buzz number (if valid) would have applied to.
How various data type occupy memory in terms of size?
The amount of memory required to store a particular data type is dependent upon the underlying architecture and the language implementation. In C, we can determine the physical characteristic of a particular implementation by including the <limits.h> header.
The <limits.h> header must define the following symbol:
#define CHAR_BIT 8
The value (8) may vary from implementation to implementation, however the standard dictates that it must be at least 8. Thus a char is always at least 8 bits in length.
For any type T, sizeof(T) returns the length of T in chars. Thus sizeof(char) is guaranteed to be 1 (char) across all implementations while sizeof(T) * CHAR_BIT will determine the number of bits. A char is the smallest unit of addressable storage, thus all type lengths are guaranteed to be at least as long as a char.
The <limits.h> header also provides symbols that we can use to determine the range of values we can store in an integral type (char, long, short, int). For instance, SCHAR_MIN defines the minimum value for a signed char. To determine the range for floating-point types (float, double, long double), include the <float.h> header.
We can also use sizeof() to determine the length of user-defined types, including aliases (typedef), struct and union types. Note that the length of a struct is not necessarily the sum of its member lengths as memory alignment constraints may introduce padding bytes to ensure members are aligned on appropriate word boundaries. For instance, a 32-bit int is faster to access when aligned on a 4-byte boundary.
What is difference between an integer variable and floting point variable?
The set of the possible values.
What type of gas should be used for a 94 camaro with a 34 engine?
Use regular if the engine doesn't ping. Always buy fuel at a place that pumps a lot. If the fuel at the station is always fresh you will have far less problems. Your engine doesn't need fuel with detergents or high octane unless the engine has been significantly modified to raise compression. Even then, it doesn't need expensive fuel, just clean fuel.
Difference between the definition and declaration of a variable in c?
definition defines the memory area ( allocates the memory ) for the variable and the declaration tells about the signature of the variable ( type and size to be considered). definition occures once through the program( memory is allocated once ), but the declaration can occur many times.
OR For a variable, the definition is the statement that actually allocates memory. For example, the statement:
long int var;
is a definition. On the other hand, an extern reference to the same variable:
extern long int var;
is a declaration, since this statement doesn't cause any memory to be allocated. Here's another example of a declaration:
typedef MyType short;
Second Answer
Declaration can come only once and definition can come many times in the program.
Let's take an example,
Line 1: #include
Line 2:
Line 3: void main()
Line 4: {
Line 5: int x; //declaration
Line 6:
Line 7: x=10; //definition
Line 8: }
In the above program, on the line 5 what appears is declaration and on line 7 the definition is there.
Now if we declare the variable x again in the program we will get the error saying that the variable is already declared.
Whereas if we assign some new value to variable x, say 20
i.e.
x=20;
this is totally fine and we can assign any number of values in the same program. This means that the declaration is only one throughout the program but definitions can be many.
NO, the tree is not necessarily the same.
For justification, I'd suggest looking at www.cs.bgu.ac.il/~dsis052/uploads/37tirgul7.doc question number 2
How do you convert integer to objects in c?
There are no objects in C, so you can't.
However, in C++ you can convert an integer to an object if the object's class exposes a public conversion constructor that accepts an integer argument. For example:
class X {
public:
X (int); // conversion constructor
// ...
};
How the conversion is implemented depends on the class designer. In the following example, a user can construct a complex number type from an integer:
class complex {
private:
double r;
double i;
public:
complex (double real, double imaginary): r {real}, i {imaginary} {}
complex (int real): r {real}, i {0.0} {}
// ...
};
Here, the implementation implicitly converts the integer to a double and assigns that value to the real representation and assigns the value 0.00 to the imaginary representation. This class may be used as follows:
complex c = 42; // e.g., c.r = 42.0, c.i = 0.0
If a conversion constructor is provided, a corresponding conversion assignment is usually provided as well:
class complex { private:
double r;
double i;
public:
complex (double real, double imaginary): r {real}, i {imaginary} {}
complex (int real): r {real}, i {0.0} {}
complex& operator= (int real) { r = real; i = 0.0; }
// ...
};
This class may be used as follows:
complex c {1.1, -3.14};
// ...
c = 42; // e.g., c.r = 42.0, c.i = 0.0
Compare Contiguous memory allocation with internal fragmentation?
in early, computer system has contiguous memory allocation,each process is allocated in a single contiguous(together) memory!!(allocating into memory addresses one by one,)it has tackled memory fragmentation(both internal and external). not allocating for a fixed size memory block.so no internal fragmentation,
allocating contiguously ,so no external fragmentation!!!
What is meant by the term low-order bits and high-order bits most significant bit?
The bits in a numeric value like
00000000 00110011
have a decimal value based on the bit position. The most significant bit is the one that has highest decimal value and is the left most bit. The right most bit is the least significant bit.
High-order bits are the half of the number of bits that have the highest values, the left most bits in the 16 bit value above The low order bits in this case are the right most bits.
This should not be confused with bit placement in memory/cpu registers. Intel/AMD cpus are little edian, meaning that the most significant part is physically right and the lest significant is left most (the bits are not in reverse order). Google for a more detailed info.
There are mainly 3 types of variables in c. Integer, Float and character :)
What difference between two nodes in c plus plus of single link list?
Their address. They may also have different values, and their sequence may matter, depending on the design of the algorithm.
What is backslash r carriage return means in c language?
\r means Carriage Return, which means: return the cursor to the beginning of the line in more simple words we can say that it's deleting each character from the active position upto the beginning.
What is the maximum dimension of array can be accepted in c?
C++ doesn't enforce any limits on array dimensions. Limitations are enforced by the hardware. The first limitation is available memory (including virtual memory). The larger the objects in the array, the fewer elements you can create in memory. The second limitation relates to the maximum integer that can be mapped to a size_t data type (which is dependent upon the architecture), however you're far more likely to run out of memory long before reaching this limit.
For instance, a 32-bit system has 4GB of addressable memory, thus (in theory) can accommodate an array of char with a 4,294,967,295 dimension (assuming an 8-bit char type). However, that would leave no memory for the operating system let alone the IDE, so the maximum would be somewhat lower than 4GB.
On a 64-bit system, a 4GB array of char would be perfectly feasible, even if the system only had 2GB of physical memory, due to the much larger address space available (18,446,744,073,709,551,616 bytes).
However, an array that partially requires virtual memory would be tremendously slow to access due to constant swap file access. Depending on the nature of the array, if it requires more memory than is physically available, it might be better handled via a database or as a random access file stream.
How many types of compiler naming in list?
cross compiler .
hybird compiler .
post compiler.
ideal compiler.
intelligence compiler.