Pointer variables are used to store the address of a variable in C. We can also access these values stored in the address. In this tutorial, we will learn how to find the largest among three numbers using a pointer. This is a beginner level tutorial and you will learn how to read values and store their address in a pointer, how to access values using a pointer variable and how to use if-else loops in C. The program will ask the user to enter three values one by one. It will save the address of three variables in three pointer variables and read the user input values to these variables. Finally, it will find out the largest number using one if-else and print it out to the user.
ReadIn this tutorial, we will learn how to compare two strings in C using strcmp() method. This method takes two arguments i.e. the two strings and returns one integer value. It is defined as below :.
ReadIn this tutorial, we will learn how to find if a character is a vowel or not in C++. The program will ask the user to enter a character. It will then find out if the character is a vowel or not and print out the result to the user.
ReadJoining strings is called concatenation. In any programming language, you will have to write code for joining strings. Javascript strings are immutable, i.e. we can't change the original string. If we want to modify the string, we need to create one new string using the characters of the given string. During string concatenation, one new string is created by joining all other strings.
ReadWe can easily sort an array of strings or an array of numbers in Javascript. But, how can we sort an array of objects? For example, if you have an array of student objects with name, age, and marks for each, what is the easiest way to sort these students based on their marks or name or age? In this tutorial, we will learn to sort such arrays. In real-world, this is the most commonly faced problem and Javascript provides one simple way to solve it.
ReadJavascript indexOf() method is one of the most useful method of Javascript string. This method can be used to find out if a sub-string is included in a string or not. In this tutorial, we will learn how to use indexOf method with examples.
ReadJavascript Date has a lot of setter methods to manipulate different properties of a date object. You can easily change the year, hour, minute, milliseconds etc. of the date object using these methods. In this post, we will learn different setter methods with examples.
ReadIn Javascript, the Date object is used to work with date and time. It provides a lot of different methods to create Date and to do different modification on it. It provides a set of different getter methods to get different date properties. In this post, I will show you these getter methods with examples.
ReadDate comparison is required any time you are using Date in your code. In Javascript, we can easily compare two Date objects. In this tutorial, I will show you how to compare two Date with one example.
ReadIn this tutorial, we will learn how to count the occurrence of a character in a string in Javascript. We will show you how to do this using two different ways. You can save the program in a javascript .js file and verify it by running the file using node. Or, you can create one simple HTML file and test the code.
Read