What does the Calendar class provide in java?
It depends on which specific class of Calendar you are referring to. Different IDEs provide different implementations. Consult your IDE's documentation for more specific information.
In general, you can expect to construct a calendar with a date in a variety of formats and return the individual year, month, day, as well as perform date calculations such as adding weeks and days to a date, or determining the name of a particular date (Sunday, Monday, etc), or working out how many days there are between two dates. Calendars may also support hours, minutes and seconds, fully-encapsulating all the things you might expect to do with dates and times.
Some implementations provide the back-end functionality of a more graphical date-picker, allowing you to select a particular date from a drop down calendar month, while others can be completely abstract, expecting you to derive your own classes to leverage the underlying functionality in any way you see fit.
where you take the a piece of sting dip it in the paint and put in a white piece of paper
How do you use a C-continue statement in a block- without any looping or conditional statements?
In the C language, the continue statement can only be used within a loop (for, while, or do). Upon execution, control transfers to the beginning of the loop.
What is a scatter file in c or c plus plus programming?
Scatter File is a linker script file used by RVCT/Keil for ARM processors. It is used by arm linker.
Peterson Number:
145 = 1! + 4! + 5!
number=sum of (factorials of digits)
You declare a class as follows:
class MyClass
{
//some stuff here...
}
You create an object as follows:
MyClass object;
This is how you create classes and objects in C++.
What is the function of symboland in C programming?
The symbol and (ampersand, &) in C and C++ programming is the bitwise inclusive or operator. If there are two ampersands (&&) it is a relational inclusive or operator. As a unary operator, it means to take the address of something. In C++, it can also be overridden in a class method to mean nearly anything else.
What is the edge of java over other object oriented programming language?
I am not sure Java is the best language; different languages have different advantages and disadvantages. However, here are some of Java's advantages; some of these advantages are shared by other languages, too:
pancakes
What is the use of matrix in data structures?
Nothing, but a two dimensional array can be used to represent a matrix.
Defult function in c language is?
Default functions are pre defined functions.
Eg. printf();
scanf();
getch();
clrscr();
etc..
Actually, no-one uses the term 'default function'. (Let alone 'defult function'.)
Another answer: Perhaps it is 'main' what you meant.
Can you declare printf for integer variable?
printf is declared in stdio.h
Format specifier for an integer value is %d.
A non touching loop is where each iteration does not access data from a different iteration. An optimizing compiler/interpreter can detect this, and spread out the loop between different threads, potentially (with multiple processors) running the loop faster.
An example of a non touching loop is the addition of two arrays. Each iteration accesses one element, and has no dependencies on elements accessed in different iterations.
An example of a touching loop is the summation of elements in an array. Each iteration depends on the result of a different, usually the prior, iteration. Even there, however, the optimization process can spread the work out amongst different threads so long as there are synchronization mechanisms in place.
What kind of Loop pedal does Liam Finn use?
Contrary to Wikipedia stating it's a Line 6 JM4 Looper, Liam actually uses a Line 6 DL4 Delay. Evidence: http://www.flickr.com/photos/wamcroundtable/5877120578/in/photostream/
What are the different storage class in c?
The four storage classes in C are: automatic, static, external and register. Note that storage classes are not classes in the object-oriented programming sense, they simply define the scope (visibility) of a variable.
Automatic Variables (auto)
All local variables are automatic by default so we seldom see the auto keyword in code. Local variables are variables declared at function scope.
Static Variables (static)
All global variables are static by default. Global variables are variables declared at file scope (outside of any function). Static variables can also be explicitly declared inside functions to override the default automatic storage class. All static variables, whether global or local, are allocated within the program's data segment (static memory) and do not fall from scope even if declared locally. All static variables are initialised to zero by default.
It's best to avoid the use of global variables unless they are declared constant (const) as it can be difficult to keep track of all the places where a global variable is being operated upon (accessed or assigned to). This can lead to data races in multi-threaded applications unless we take steps to synchronise all access and assignment operations upon the variable. For that reason it's best to keep variables as localised as possible, passing arguments into functions whenever we need to cross scopes. Non-constant global variables should really only be considered if they truly represent a global concept within the file in which they are declared.
External Variables (extern)
External storage can only be applied to a global variable declared outwith file scope. That is, when a global variable is declared in one file, any external file can gain access to that same global variable simply by declaring the same name and type but with external storage. It follows that external variables are also static variables and is the only case where a variable has two storage classes. Note the local static variables (including local constant variables) cannot be declared external, they are local to the function in which they are declared.
This is another reason why it is best to avoid using too many global variables. While we can generally keep track of which code can access a global variable at file scope we have no means of limiting access from outwith that file. Again, prefer local variables to global variables whenever possible.
Register Variables (register)
A register variable is a variable that we wish to allocate to a CPU register rather than in RAM. Register variables must be no larger than the word-length of the machine and should only be used when we explicitly require fast access to the variable, such as loop counters, accumulators and pointer variables. Note that CPU registers have no address (no identity we can refer to) so we cannot use the unary '&' operator to take the address of a register variable. This means we cannot use pointers to refer to them indirectly which, in turn, means we can only pass them to functions by value (not by reference). However, to do so would defeat the purpose of using the register storage class.
Given the limited number of registers available, there is no guarantee that a register variable will actually be allocated to a register; the register keyword is merely a hint to the compiler. It should be noted that modern compilers are extremely good at optimising code so there is seldom any need to explicitly declare register variables.
Why should a function or a variable be declared before its first use?
It is somewhat syntax of programming. But when program runs,device known as pre-processor process statements before main function. So when we use that function inside main function it will get idea and run directly without showing any error.
So for compilers simplicity and fast execution purpose it is necessary to declare function before its use.
Write a C statement that uses the manipulator setfill to output containing 35 stars?
(don't forget to include) #include <iomanip>
cout << setfill('*') < <setw(35) << '*' <<endl;