George John has Published 1081 Articles

Early binding and Late binding in C++

George John

George John

Updated on 28-Apr-2025 18:35:32

16K+ Views

In C++, binding is the process of connecting names such as variables and functions to their actual memory locations. When you intend to call a function, the program must identify the proper function definition for the execution. So, binding is the process of making this connection. This happens either at ... Read More

Difference between strncmp() and strcmp() in C/C++

George John

George John

Updated on 14-Apr-2025 19:16:27

2K+ Views

Both strncmp() and strcmp() are used in C/C++ programs for lexicographical string comparison. The strcmp() compares two strings till the null character is found, whereas strncmp() only compares a specified number of characters. What is strncmp() ? The function strncmp() is used to compare left string to right string up ... Read More

How do I find the length of an array in C/C++?

George John

George John

Updated on 09-Apr-2025 19:14:40

21K+ Views

To find the length of an array in C++, we can use various functions and approaches that we are going to discuss in this article. Finding the length of an array is a very common task and is used in looping through an array, sorting the array, finding maximum and ... Read More

Python object persistence (shelve)

George John

George John

Updated on 22-Jan-2025 13:49:50

5K+ Views

Python Object Persistence  The shelve module in Python's standard library is a simple yet effective tool for persistent data storage when using a relational database solution is not required. The shelf object defined in this module is a dictionary-like object persistently stored in a disk file. This creates a file ... Read More

Show MySQL host via SQL Command?

George John

George John

Updated on 24-Dec-2024 17:56:34

31K+ Views

To display MySQL host via SQL command, use the system variable hostname. Query 1 The following is the query to display the host − mysql > select @@hostname; Output Here is the output − +-----------------+ | @@hostname | +-----------------+ | DESKTOP-QN2RB3H | +-----------------+ 1 row ... Read More

Read whole ASCII file into C++ std::string

George John

George John

Updated on 03-Dec-2024 09:40:15

15K+ Views

This is a simple way to read whole ASCII file into std::string in C++ − Algorithm Here is the algorithm we will follow to Read the whole ASCII file into C++ std::string. Begin  Declare a file a.txt using file object f of ifstream type to perform a ... Read More

Local Class in C++

George John

George John

Updated on 19-Nov-2024 18:22:05

3K+ Views

A class declared inside a function is known as a local class in C++ as it is local to that function, where its scope is limited to that function. Syntax Here the syntax for a local class is given as follows. #include using namespace std; void func() {  class LocalClass ... Read More

Java program to count the child of root node in a JTree

George John

George John

Updated on 13-Nov-2024 19:20:01

323 Views

In this article, we will go over a Java program that counts the number of child nodes of the root node in a JTree using Java. This program uses the getChildCount() method to retrieve and display the count of direct child nodes under the root. This is helpful for applications ... Read More

Java program to increase the row height in a JTable

George John

George John

Updated on 29-Sep-2024 02:48:44

2K+ Views

In the given article, we will learn to write a program in Java to increase the row height in a JTable. The example creates a table with different languages and their difficulty levels and then modifies the row height using the setRowHeight() method. Steps to increase the row height in ... Read More

Java program to set JComboBox in JOptionPane

George John

George John

Updated on 29-Sep-2024 02:47:14

2K+ Views

In this article, we will explore how to create a graphical user interface (GUI) in Java using JComboBox and JOptionPane. The program will display a pop-up dialog that contains a drop-down list, allowing the user to select their favorite sport from a list. By default, one of the options will ... Read More

1 2 3 4 5 ... 109 Next
Advertisements