We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Tag: variable

How to pass variable arguments in a function

In this article we will discuss how to pass variable number of arguments in a function. Requirement: Advertisements Suppose I want to create a function that take variable number of arguments and use them to perform some task. For example, Create a function that will return the sum of all the passed arguments i.e. Frequently …

How to pass variable arguments in a functionRead More

Passing Variable Arguments to a function in Java using varargs – Tutorial & Example

In this article we will discuss how to pass variable number of arguments of a type in a function in java using varargs. Passing Variable Arguments to a function Let’s write a function that accepts variable number of same type for example int in this case i.e. Advertisements Calling function with 2 arguments i.e. two …

Passing Variable Arguments to a function in Java using varargs – Tutorial & ExampleRead More

C++11 : How to use std::thread as a member variable in class ?

In this article we will discuss how to use std::thread object as member variable inside class and its benefits. As std::thread objects are move only, therefore while designing a class that use std::thread as member variable, we need to take care that objects of this class should also be move only. Advertisements Creating Move-only class with …

C++11 : How to use std::thread as a member variable in class ?Read More

Python : **kwargs | Functions that accept variable length key value pair as arguments

In this article we will discuss how to create functions in Python that can accept variable length arguments in key value pair format. Suppose we want to define a function that will print the provided students details. Details will be in key value pairs, where key represents the property name and value as property’s value. …

Python : **kwargs | Functions that accept variable length key value pair as argumentsRead More

Check if type of a variable is string in Python (3 Ways)

In this article we will discuss three different ways to check if the type of a variable is string or not in python. Check if type of a variable is string in python using isinstance() function Python provides a function to check the type of a variable i.e. Advertisements isinstance(object, classinfo) This function returns True …

Check if type of a variable is string in Python (3 Ways)Read More

Cart

Your Cart is Empty

Back To Shop