Write a C program to find a peculiar two digit number which is three times the sum of its digits.
Why do we use pointer instead of variable?
We *must* use pointers for the following:1. To fake pass-by-reference semantics;2. To track dynamically allocated memory;3. To build self-referential data structures.If we want a function to modify...
List of pros & cons of pointers over variables1. Fetching speed is faster thru pointers as pointers directly access the memory2. Useful in the concepts of pass by reference. variable value can be chan...
What is pointer to an array? Explain with example.
For any given data type T, a pointer to an array of T is declared as "T (*arr)[N];". It has the same value as a pointer to the first element of the array, but a different type (T (*)[N...
Actually there does not exist array rather here is a term called pointer to an array.let me explain with the help of one example.suppose we have following code#include<stdio.h>#define i 10main()...
What is the basic principle behind recursion, other than function calling itself again & again and in which real time scenario we use it?
The basic idea behind recursion is that you're solving one big problem by breaking it into multiple smaller, easier-to-solve problems. This can make the algorithm easier to write and un...
Recursion is the process of calling function again and again.During the recursion many push and pop operation is done in our registers memory. That's why recursion has very poor performance.Our compu...
What is the use of static in (public static void main string args[])
We can use static key word for any method which does not require an object to call, so main method is automatically called by the JVM so it does not require any object it is mentioned as static. We ca...
without creating instance of that class to invoke the main method static keyword is used, by giving the name of the class main method gets invoked.
When you declare a class, why does it automatically extends to object class? Give 2 reasons.
When preparing the Java by JavaPeople they thought like every object what we prepare should have some common property so that we can do some basic operations like for example clone() method. So ...
Object class is the super class of all the classes provided by java.lang package. And I think you know that all the basic functions to write a program like println() are the content of the class...
Bluetooth modulation processes
What kind of modulation processes are ADOpted in bluetooth technology?
the modulation is FSK
Bluetooth uses FHSS (Frequency Hopping Spread Spectrum) technique which is used in spread spectrum signal transmission. To understand Frequency hoping spread spectrum, its is necessary to un...
What is difference between main() and void main()?
The programms under the main() function means that this main() function is of int type as any function is declared as int by default in c language.it means it will return the value which it takes and ...
The short answer is that void main() has never been a legitimate usage in C, and a compiler, seeing it, is well within its rights to spew an error, or worse, spew garbage results if you use it.By cont...
Difference between ntfs and fat32?
Answered by: Aparna Patil
Answered On : Mar 24th, 2006NTFS
1)allows access local to w2k,w2k3,XP,win NT4 with SP4 & later may get access for somefile.
2)Maximum size of partition is 2 Terabytes & more.
3)Maximum File size is upto 16TB.
4)File & folder Encryption is possible only in NTFS.
FAT 32
1)Fat 32 Allows access to win 95,98,win millenium,win2k,xp on local partition.
2)Maximum size of partition is upto 2 TB.
3)Maximum File size is upto 4 GB.
4)File & folder Encryption is not possible.
New Technology File System
NTFS= New Technology File System. or Network Technology File System
Why is transient modifier used and where in real life?
Many people disturbed me about the solution,some one help me.
Volatile modifier is being used in the field of multithreading because whenever all the threads access to a single variable ,they have their seperate copy of that variable and if they modifies the var...
In Java, all objects are not serializable.In distibuted environment,an object needs to be serializable.(serialization means writing the state of an object to a file using output stream so that it pers...
what is the difference between declaring a variable and defining a variable?
Declaring a variable means describing its type to the compiler but not allocating any space for it. Defining a variable means declaring it and also allocating space to hold the variable. You can also initialize a variable at the time it is defined.
As far as declaration of variable is concerned it only shows the properties of variable and we declare the data type which are to be used by that variable but when it comes to the definition of variab...
int num;
This statement is declaration and also defination since it also allocates memory for variable num.
But when you use following statement
extern int num;
It is only declaration since you are not allocating memory here.
Answered by: Prasad
Answered On : Apr 27th, 2007Constant pointer is NOT pointer to constant. Constant pointer means the pointer is constant. For eg:
Constant Pointer
int * const ptr2 indicates that ptr2 is a pointer which is constant. This means that ptr2 cannot be made to point to another integer. However the integer pointed by ptr2 can be changed.
Where as a Pointer to constant is
const int * ptr1 indicates that ptr1 is a pointer that points to a constant integer. The integer is constant and cannot be changed. However, the pointer ptr1 can be made to point to some other integer.
An ordinary pointer variable preceeded with the "const" modifier. This prevents the value initialised from getting changed.
Absolutely there is the vast difference between constant pointer and the pointer to a constant.it will be more clear with the examples of both the types.CONSTANT POINTER:-int const *a...this means the...
An lvalue was defined as an expression to which a value can be assigned. Is an array an expression to which we can assign a value? The answer to this question is no, because an array is composed of several separate array elements that cannot be treated as a whole for assignment purposes. The following...
An object is a region of storage that can be examined and stored into. An lvalue is an expression that refers to such an object. An lvalue does not necessarily permit modification ...
Per the C Language Standard (hoping the posting software doesn't munge the following so that it's completely unreadable): ---------------------6.3.2.1 Lvalues, arrays, and function desig...
When is a switch statement better than multiple if statements?
a switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type.
Simply saying, IF-ELSE can have values based on constraints
where SWITCH can have values based on user choice.
Switch statements can be used when any one of the given alternatives are to be matched. In the sense, only when an equality operator is needed. Other relational operators can't be used in switch c...
simple logic
The only peculiar two digit num is 27..