
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
Bhanu Priya has Published 1449 Articles

Bhanu Priya
2K+ Views
ProblemFind the sum of an arithmetic progression series, where the user has to enter first number, total number of elements and the common difference.SolutionArithmetic Progression (A.P.) is a series of numbers in which the difference of any two consecutive numbers is always the same. Here, total number of elements is ... Read More

Bhanu Priya
10K+ Views
Based on the units consumed by the user, the electricity bill is generated. If number of units consumed are more then, the rate of a unit charge will also increase.The logic applied if minimum units are consumed by the user is as follows −if (units < 50){ amt = ... Read More

Bhanu Priya
7K+ Views
In order to add two complex numbers in C programming language, the user has to take two complex numbers as structure members and perform addition operation on those two numbers by creating a user-defined function.AlgorithmRefer an algorithm given below for addition of two complex numbers.Step 1: Declare struct complex with ... Read More

Bhanu Priya
5K+ Views
An array of structure in C programming is a collection of different datatype variables, grouped together under a single name.General form of structure declarationThe structural declaration is as follows −struct tagname{ datatype member1; datatype member2; datatype member n; };Here, struct is the keyword.tagname specifies the name of ... Read More

Bhanu Priya
2K+ Views
An array of characters is called a string.DeclarationThe syntax for declaring an array is as follows −char stringname [size];For example − char string[50]; string of length 50 charactersInitializationUsing single character constant −char string[10] = { ‘H’, ‘e’, ‘l’, ‘l’, ‘o’ ,‘\0’}Using string constants −char string[10] = "Hello":;Accessing − There is ... Read More

Bhanu Priya
8K+ Views
First, let us understand what are the arrays of pointers in C programming language.Arrays of pointers: (to strings)It is an array whose elements are ptrs to the base add of the string.It is declared and initialized as follows −char *a[ ] = {"one", "two", "three"};Here, a[0] is a pointer to ... Read More

Bhanu Priya
894 Views
The C library function char *strstr(const char *haystack, const char *needle) function finds the first occurrence of the substring needle in the string haystack. The terminating '\0' characters are not compared.An array of characters is called a string.DeclarationThe syntax for declaring an array is as follows −char stringname [size];For example ... Read More

Bhanu Priya
4K+ Views
An array of characters is called a string.DeclarationThe syntax for declaring an array is as follows −char stringname [size];For example − char string[50]; string of length 50 charactersInitializationUsing single character constant −char string[10] = { ‘H’, ‘e’, ‘l’, ‘l’, ‘o’ ,‘\0’}Using string constants −char string[10] = "Hello":;Accessing − There is ... Read More

Bhanu Priya
3K+ Views
The C library function int strncmp(const char *str1, const char *str2, size_t n) compares at most the first n bytes of str1 and str2.An array of characters is called a string.DeclarationThe syntax for declaring an array is as follows −char stringname [size];For example − char string[50]; string of length 50 ... Read More

Bhanu Priya
671 Views
The C library function int strcmp(const char *str1, const char *str2) compares the string pointed to, by str1 to the string pointed to by str2.An array of characters is called a string.DeclarationFollowing is the declaration for an array −char stringname [size];For example − char string[50]; string of length 50 charactersInitializationUsing ... Read More