
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

7K+ Views
Suppose we have two numbers a and b. We shall have to define a function that can calculate (a + b) and (a - b) both. But using a function in C, we can return at most one value. To find more than one output, we can use output parameters into function arguments using pointers. Here in this problem we shall update a with a+b and b with a-b. When we call the function we shall have to pass the address of these two variables.So, if the input is like a = 5, b = 8, then the output will ... Read More

38K+ Views
Suppose we have four numbers a, b, c, and d. We shall have to find maximum among them by making our own function. So we shall create one max() function that takes two numbers as input and finds the maximum, then using them we shall find maximum of all four numbers.So, if the input is like a = 5, b = 8, c = 2, d = 3, then the output will be 8To solve this, we will follow these steps −define a function max(), this will take x and yreturn maximum of x and ytake four numbers a, b, ... Read More

6K+ Views
Suppose we have two integer numbers a, b and two floating point numbers c, d. We shall have to find the sum of a and b as well as c and d. We also have to find the sum of a and c as well. So depending on the printf function style, output may differ.So, if the input is like a = 5, b = 58 c = 6.32, d = 8.64, then the output will be a + b = 63 c + d = 14.960001 a + c = 11.320000To solve this, we will follow these steps −To ... Read More

25K+ Views
Suppose you want to take a character, then a string and a sentence (string with spaces) using C. So we shall provide three inputs and print the same as output. The maximum size of the string is 500 here.So, if the input is likecharacter = 'T' string = "ProgrammingLanguage" sentence = "I love programming through C", then the output will beYour character: T Your string: ProgrammingLanguage Your sentence: I love programming through CTo solve this, we will follow these steps −For character we need to use scanf("%c", &character);For string we need to use scanf("%s", string);This step is optional, but required ... Read More

485 Views
The isUndefined() method in AngularJS basically checks if a reference is defined or not. This method will return True if the reference passed inside the function is not defined or undefined, else it will return False.Syntaxangular.isUndefined(value)Example − Check if the reference isUndefined or notCreate a file "isUndefined.html.3" in your Angular project directory and copy-paste the following code snippet. angular.isUndefined() Welcome to Tutorials Point AngularJS | ... Read More

5K+ Views
The forEach() function in AngularJS uses the Iterator object to iterate over the collection of items or objects or an array. The iterator function is called with the iterator object(value, key, obj) where, value represents the object property or an array element, key specifies the object property key or array element index, andobj represents the whole object.Note that the forEach() function does not iterate over the inherited properties.Syntaxangular.forEach(obj, iterator, [context])Example − Iterate the values using forEach()Create a file "forEach.html" in your Angular project directory and copy-paste the following code snippet. angular.forEach() ... Read More

331 Views
Suppose we have a directed graph with n colored nodes and m different edges. And the nodes are numbered from 0 to n-1. We have a string col with lowercase letters, where col[i] represents the color of the ith node in this graph (0-indexed). We also have an edge list where edges[j] = (u, v) represents, there is an edge between u and v.A valid path in the graph is a sequence of nodes xi for all i from 1 to k, such that there is a directed edge from xi to xi+1. The color of the path is the ... Read More

381 Views
Suppose we have a list of intervals, where intervals[i] has a pair (left_i, right_i) represents the ith interval starting at left_i and ending at right_i (both inclusive). We also have another array called queries. The answer to the jth query is the size of the smallest interval i such that left_i

205 Views
Suppose there is an array called rooms. where rooms[i] contains a pair [roomId_i, size_i] denotes a room whose id is roomId_i and size is size_i. All room numbers are distinct. We also have another array queries, where queries[j] contains a pair [preferred_j, minSize_j]. The answer to the jth query is the room number id of a room such that −The room has size of at least minSize_j, and|id - preferred_j| is minimized.Now, if there is a tie in the absolute difference, then use the room with the smallest id. If there is no such room, return -1. So we have ... Read More

839 Views
Suppose we have a value n and another list of pairs called restrictions. We want to build n new buildings in a city. But there are few restrictions. We can built in a line and buildings are labeled from 1 to n. The restrictions has two parameters, so restrictions[i] = (id_i, max_height_i) indicates id_i must have height less than or equal to max_height_i. The city restrictions on the heights of the new buildings are as follows −The height of each building must be 0 or positive values.First building height must be 0.The difference between any two adjacent buildings height cannot ... Read More