Some Comment to Pointer

Important Concept of Pointer#include void main (){char i=’a’;//case 1char *j;j=&i;//case 2//char *j=&i; this one is correct, which is shorthand of case 1;//char *j=i; this one is wrong, because j is address, but i is char. //case 3//char *j;//*j=&i; //wrong!!! *j is char, but &i is address of ‘a’// also, you need to define the pointer(give the address to it) before…

Arrays and Pointers

To fully understand the workings of C you must know that pointers and arrays are related. An array is actually a pointer to the 0th element of the array. Dereferencing the array name will give the 0th element. This gives us a range of equivalent notations for array access. In the following examples, arr is an array. array[0] == *arrayarray[n]…

io.BufferedWriter class methods in Java

Bufferreader class writes text to character-output stream, buffering characters.Thus, providing efficient writing of single array, character and strings. A buffer size needs to be specified, if not it takes Default value.An output is immediately set to the underlying character or byte stream by the Writer. Class Declaration public class BufferedWriter extends Writer Constructors BufferedWriter(Writer out): Creates a buffered character-output stream…

Recursive Functions

A recursive function is one which calls itself. This is another complicated idea which you are unlikely to meet frequently. We shall provide some examples to illustrate recursive functions. Recursive functions are useful in evaluating certain types of mathematical function. You may also encounter certain dynamic data structures such as linked lists or binary trees. Recursion is a very useful…

Type Conversion in Python

Python defines type conversion functions to directly convert one data type to another which is useful in day to day and competitive programming. This article is aimed at providing the information about certain conversion functions. 1. int(a,base) : This function converts any data type to integer. ‘Base’ specifies the base in which string is if data type is string. 2.…

Input and Output

Input and output are covered in some detail. C allows quite precise control of these. This section discusses input and output from keyboard and screen. The same mechanisms can be used to read or write data from and to files. It is also possible to treat character strings in a similar way, constructing or analysing them and storing results in…