Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
C GFacts C-Variable Declaration and Scope

How are variables scoped in C – Static or Dynamic?

In C, variables are always statically (or lexically) scoped i.e., binding of a variable can be determined by program text and is independent of the run-time function...
C GFacts C-Input and Output Quiz

What is return type of getchar(), fgetc() and getc() ?

In C, return type of getchar(), fgetc() and getc() is int (not char). So it is recommended to assign the returned values of these functions to an integer type variab...
C GFacts C-Input and Output Quiz

Return values of printf() and scanf() in C/C++

What values do the printf() and scanf() functions return ? printf() : It returns total number of Characters Printed, Or negative value if an output error or an e...
C C++ GFacts

Operands for sizeof operator

In C, sizeof operator works on following kind of operands: 1) type-name: type-name must be specified in parentheses. sizeof (type-name)  2) ...
C GFacts C-Functions

What is evaluation order of function parameters in C?

It is compiler dependent in C. It is never safe to depend on the order of evaluation of side effects. For example, a function call like below may very well behave dif...
C GFacts C-File Handling

fseek() vs rewind() in C

In C, fseek() should be preferred over rewind(). Note the following text C99 standard: The rewind function sets the file position indicator for the stream pointed to...
C C++ GFacts

How does “void *” differ in C and C++?

C allows a void* pointer to be assigned to any pointer type without a cast, whereas C++ does not; this idiom appears often in C code using malloc memory allocation. ...
C C++ GFacts

When is copy constructor called?

In C++, a Copy Constructor may be called in following cases: 1. When an object of the class is returned by value. 2. When an object of the class is passed (to a func...
C C++ GFacts

What are the operators that can be and cannot be overloaded in C++?

List of operators that can be overloaded are: + - * / % ^ & | ~ !, = = ++ -- == != && ...
C C++ GFacts

What all is inherited from parent class in C++?

Following are the things which a derived class inherits from its parent. 1) Every data member defined in the parent class (although such members may not always be acc...

Subscribe to Our Newsletter