Arjun Thakur has Published 1109 Articles

Undefined Behaviour in C and C++

Arjun Thakur

Arjun Thakur

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

220 Views

Here we will see some C and C++ Codes. and try to guess the results. The codes will generate some runtime errors.1. The Divide By Zero error is undefined.Example Code#include using namespace std; int main() {    int x = 10, y = 0;    int z = x / y;    cout

Output Iterators in C++

Arjun Thakur

Arjun Thakur

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

519 Views

Here we will see what are the Output iterators in C++. The Output iterators has some properties. These are like below:The output iterators are used to modify the value of the containers.We cannot read data from container using this kind of iteratorsThis is One-Way and Write only iteratorIt can be ... Read More

Check if table exists in MySQL and display the warning if it exists?

Arjun Thakur

Arjun Thakur

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

302 Views

To check if table exists, use the following syntax −CREATE TABLE IF NOT EXISTS yourTableName (    yourColumnName1 dataType,    .    .    .    .    N );Here, we will try to create a table that already exists and then it will produce a warning message “Table already ... Read More

HTML width Attribute

Arjun Thakur

Arjun Thakur

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

172 Views

The width attribute of the element is only used with image and allows you to set the width of the image added using −The width attribute introduced in HTML5 and acts as the submit button. Following is the syntax −Above, width represents the width in pixels.Let us now see ... Read More

Convert the column to a case-sensitive collation in MySQL?

Arjun Thakur

Arjun Thakur

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

496 Views

For this, you can use COLLATE. Following is the syntax −select *from yourTableName where yourColumnName LIKE yourValue COLLATE utf8_bin;Let us first create a table −mysql> create table DemoTable    (    LastName varchar(100)    ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command ... Read More

How to create Glue to fill the space between neighbouring components in Java?

Arjun Thakur

Arjun Thakur

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

386 Views

Let’s say we have 6 components and we need to fill the space between some of them −JButton button1 = new JButton("CSK"); JButton button2 = new JButton("DC"); JButton button3 = new JButton("MI"); JButton button4 = new JButton("SRH"); JButton button5 = new JButton("RR"); JButton button6 = new JButton("KKR");To fill the space ... Read More

Advertisements