Nishtha Thakur has Published 564 Articles

Dynamic_cast and static_cast in C++

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

3K+ Views

static_cast: This is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coersion and can also be called explicitly. You should use it in cases like converting float to int, char to int, etc. This can cast related type classes. If the types are ... Read More

What is converting constructor in C++ ?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

113 Views

In this section we will see what is the conversion constructor or converting constructor in C++ class. A constructor is a special type of function of class. It has some unique property like, its name will be same as class name, it will not return any value etc. The constructors ... Read More

MongoDB Increment value inside nested array?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

564 Views

You can use positional operator $ for this. To understand the above concept, let us create a collection with the document. The query to create a collection with a document is as follows −> db.incrementValueInNestedArrayDemo.insertOne(    ... {"UniqueId":1,       ... "StudentDetails":       ... [     ... Read More

Scansets in C

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

Let us see, what is the scanset in C. The scanset is basically a specifier supported by scanf family functions. It is represented by %[]. Inside scanset we can specify only one character or a set of characters (Case Sensitive). When the scanset is processed, the scanf() can process only ... Read More

How to use blob data type in Android sqlite?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

1K+ Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Write a C macro PRINT(x) which prints x

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

1K+ Views

Here we will see how to define a macro called PRINT(x), and this will print whatever the value of x, passed as an argument.To solve this problem, we will use the stringize operator. Using this operator the x is converted into string, then by calling the printf() function internally, the ... Read More

Create Octet Tuple from another collection in Java

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

74 Views

You can create Octel Tuple from another collection i.e. List or arrays. For List, use the fromCollection() method.Let us first see what we need to work with JavaTuples. To work with Octet class in JavaTuples, you need to import the following package −import org.javatuples.Octet;Note: Download JavaTuples Jar library to run ... Read More

Difference between C structures and C++ structures

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

3K+ Views

Here we will see what are the differences between structures in C and structures in C++. The C++ structures are mostly like classes in C++. In C structure, all members are public, but in C++, they are private in default. Some other differences are listed below.C StructureC++ StructureStructures in C, ... Read More

How to get a particular element from MongoDB array?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

133 Views

You can use the aggregate framework to get a particular element from the MongoDB array. To understand the concept, let us create a collection with the document. The query to create a collection with the document is as follows −> db.getParticularElement.insertOne({"InstructorName":"Larry", "InstructorTechnicalSubject":["Java", "C", "C++", "MongoDB", "MySQL", "SQL Server"]}); {   ... Read More

Memory Layout of C Programs

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

The memory layout for C programs is like below. There are few levels. These are −Stack SegmentHeap SegmentText SegmentData segmentNow let us see what are the functionalities of these sections.Sr.NoSections & Description1StackThe process Stack contains the temporary data such as method/function parameters, return address and local variables. It is an ... Read More

Advertisements