0% found this document useful (0 votes)
53 views6 pages

Jaz C

The document defines various C and C++ programming concepts like data types, operators, functions, classes, inheritance, polymorphism, pointers, arrays and more. It provides definitions and examples for each concept in the form of questions and answers.

Uploaded by

musharafmd696
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views6 pages

Jaz C

The document defines various C and C++ programming concepts like data types, operators, functions, classes, inheritance, polymorphism, pointers, arrays and more. It provides definitions and examples for each concept in the form of questions and answers.

Uploaded by

musharafmd696
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.Who invented c language?

C is a general-purpose programming language created by Dennis


Ritchie at the Bell Laboratories in 1972. It is a very popular language,
despite being old. The main reason for its popularity is because it is a
fundamental language in the field of computer science.
2.What is token?
A token is an object that represents something else, such as
another object (either physical or virtual), or an abstract concept as, for
example, a gift is sometimes referred to as a token of the giver's esteem
for the recipient.
3.What is variable?
A variable is a user-defined or a user-readable custom
name assigned to a memory location. Variables hold a value that
can be modified and reused many times during the program
execution.
4.What is constant?
A constant is a name given to the variable whose values
can't be altered or changed. A constant is very similar to variables in
the C programming language, but it can hold only a single variable
during the execution of a program.
5.What is operator?
The operators are types of symbols that inform a compiler
for performing some specific logical or mathematical functions. The
operators serve as the foundations of the programming languages.
Thus, the overall functionalities of the C programming language
remain incomplete if we do not use operators.
6.What is meant by a branching system?
Branching statements allow the flow of execution to jump
to a different part of the program. The common branching
statements used within other control structures include: break ,
continue , return , and goto .
7.What is the use of goto statement?
The goto statement in C is used to jump from one block to
another block during execution, and transfer the flow of execution of
the code. The syntax of the goto statement can be divided into two
parts: Defining the label. Transferring the execution control.
8.What is the structure of for loop?
For-loops have two parts: a header and a body. The
header defines the iteration and the body is the code that is
executed once per iteration. The header often declares an explicit
loop counter or loop variable. This allows the body to know which
iteration is being executed.
9.What is meant by instruction?
Instructions in C are the commands in the program that
will instruct C compiler to perform specific tasks or actions.
Whenever we write a C instruction, we are telling C compiler
10.What is meant by function?
We refer to a function as a group of various statements
that perform a task together. Any C program that we use has one
function at least, that is main(). Then the programs can define
multiple additional functions in a code.
11.What is meant by parameters?
The values that are declared within a function when the
function is called are known as an argument. The variables that are
defined when the function is declared are known as parameters.
12.What is meant by pointer?
The pointers in C language refer to the variables that
hold the addresses of different variables of similar data types. We
use pointers to access the memory of the said variable and then
manipulate their addresses in a program.

13.What is assignment operators?


An assignment operation assigns the value of the right-
hand operand to the storage location named by the left-hand
operand. Therefore, the left-hand operand of an assignment
operation must be a modifiable l-value. After the assignment, an
assignment expression has the value of the left operand but isn't an
l-value.
14.What are the basic datatypes in c?
The C language provides the four basic arithmetic type
specifiers char, int, float and double, and the modifiers signed,
unsigned, short, and long.
15.How to get input input in c language?
Here's an example of using scanf() to read an integer
value from the user and store it in a variable called num : int num;
printf("Enter an integer: "); scanf("%d", &num); In this example, the
%d conversion specifier tells scanf() to expect an integer input
value.
16.What is encapsulation?
In C++, encapsulation involves combining similar data
and functions into a single unit called a class. By encapsulating
these functions and data, we protect that data from change. This
concept is also known as data or information hiding. Let's look at an
example of C++ class encapsulation: 1.
17.What is inheritance ?
Inheritance is a mechanism of reusing and extending
existing classes without modifying them, thus producing hierarchical
relationships between them. Inheritance is almost like embedding
an object into a class.

18.What is polymorphism?
Polymorphism in C++ means, the same entity (function
or object) behaves differently in different scenarios. Consider this
example: The “ +” operator in c++ can perform two specific
functions at two different scenarios i.e when the “+” operator is used
in numbers, it performs addition.
19.What is class?
The class represents a group of objects having similar
properties and behavior. For example, the animal type Dog is a
class while a particular dog named Tommy is an object of the Dog
class.
20.Define object?
An Object is an instance of a Class. When a class is
defined, no memory is allocated but when it is instantiated (i.e. an
object is created) memory is allocated.
21.Define friend function?
A friend function is a function that isn't a member of a
class but has access to the class's private and protected members.
Friend functions aren't considered class members; they're normal
external functions that are given special access privileges.
22.Define inline function?
A friend function is a function that isn't a member of a
class but has access to the class's private and protected members.
Friend functions aren't considered class members; they're normal
external functions that are given special access privileges.
23.What is meant by overloading?
C++ lets you specify more than one function of the same
name in the same scope. These functions are called overloaded
functions, or overloads. Overloaded functions enable you to supply
different semantics for a function, depending on the types and
number of its arguments.

24.What is meant by call by reference?


Call by Reference is a method in which it passes the
reference or address of the actual parameter to the function's
formal parameters, which means if there is any change in the
values inside the function, it reflects that change in the actual
values.
25.What is derived class?
A derived class is a class that is constructed from a base
class or an existing class. It has a tendency to acquire all the
methods and properties of a base class. It is also known as a
subclass or child class.
26.What is scope resolution operator?
This operator gives you more freedom in naming your
variables by letting you Read method of the MyFile class of objects,
as opposed to YourFile::Read, which refers to a Read method in the
YourFile class distinguish between variables with the same name.
27.How to display output in c++?
We use the cout object along with the << operator for
displaying output.
28.What is meant by keyword?
Keywords are predefined reserved identifiers that have
special meanings. They can't be used as identifiers in your
program. The following keywords are reserved for Microsoft C++.
29.What is meant by logical operator?
Logical operators are used to check whether an
expression is True or False. After using Logical Operators on the
variables, the result returned is a Boolean Value i.e., Either a True
or False value. By default, the operand values are converted into
type Boolean and then compared and computed.

30.What is meant by relational operator?


In computer science, Relational Operators are a concept
where they are used to define the relation between 2 or more
entities in a program. Relational Operators are used for the purpose
of comparison of two or more numerical values stored in an
operand.

You might also like