
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 1339 Articles for C

234 Views
This C/C++ function call puzzle is a puzzle that is intended to explore more about the behaviour of method calling in both the programming languages C and C++/.The output of a method in C and C++ is different. Lets see what is the difference in calling methods in C and C++.Let’s take an example and check the output of the below code in c and c++.Example Live Demovoid method() { // Print statement } int main() { method(); method(2); }OutputFor C++ −Error : too many arguments to function ‘void method()’For C −Program runs without any error.Logic behind the ... Read More

41K+ Views
C Files I/O − Create, Open, Read, Write and Close a File C File management A File can be used to store a large volume of persistent data. Like many other languages 'C' provides the following file management functions, Creation of a file Opening a file Reading a file Writing to a file Closing a file Following are the most important file management functions available in 'C, ' function ... Read More

13K+ Views
Keyword is a predefined or reserved word which is available in C++ library with a fixed meaning and used to perform an internal operation. C++ Language supports more than 64 keywords.Every Keyword exists in lower case letters like auto, break, case, const, continue, int etc.32 Keywords in C++ Language which is also available in the C language.autodoubleintstructbreakelselongswitchcaseenumregistertypedefcharexternreturnunionconstfloatshortunsignedcontinueforsignedvoiddefaultgotosizeofvolatiledoifstaticwhileThese are 30 reserved words that were not in C, but added to C++asmdynamic_castnamespacereinterpret_castboolexplicitnewstatic_castcatchfalseoperatortemplateclassfriendprivatethisconst_castinlinepublicthrowdeletemutableprotectedtruetrytypeidtypenameusingusingusingwchar_tInput: str=”for” Output: for is a keywordExplanationKeywords are reserved words which cannot be used as variable names in program.There are 32 keywords in the C programming language.Compare the string with each ... Read More

691 Views
Find the sum up to n terms of the series: 1.2.3 + 2.3.4 + … + n(n+1)(n+2). In this 1.2.3 represent the first term and 2.3.4 represent the second term.Let’s see an example to understand the concept better, Input: n = 5 Output: 420Explanation1.2.3 + 2.3.4 + 3.4.5 + 4.5.6 + 5.6.7 = 6 + 24 + 60 + 120 + 210 = 420nth term = n(n+1)(n+2); where n = 1, 2, 3, …= n(n^2+3n+2)=n^3 +3n^2 +2nNow, noteSum =n(n+1)/2 ; if nth term =n=n(n+1)(2n+1)/6 ; if nth term =n^2=n^2(n+1)^2/4 ; if nth term =n^3Hence the required sum =n^2(n+1)^2 /4 + ... Read More

147 Views
An inscribed planar shape or solid is one that is enclosed by and "fits snugly" inside another geometric shape or solid. To say that "square is inscribed in triangle" means precisely the same thing as "triangle is circumscribed about square".Biggest Square that can be inscribed within an Equilateral triangle −Biggest Square that can be inscribed within an Equilateral triangle −Let’s take an example, Input: 5 Output: 2.32ExplanationThe side of the square be x.Now, AH is perpendicular to DE.DE is parallel to BC, angle AED = angle ACB = 60In triangle EFC, ⇒ Sin60 = x/ EC ⇒ √3 / ... Read More

127 Views
A Reuleaux triangle is a shape formed from the intersection of three circular disks, each having its center on the boundary of the other two. Its boundary is a curve of constant width, the simplest and best known such curve other than the circle itself. Constant width means that the separation of every two parallel supporting lines is the same, independent of their orientation. Because all its diameters are the same.The boundary of a Reuleaux triangle is a constant width curve based on an equilateral triangle. All points on a side are equidistant from the opposite vertex.To construct a Reuleaux ... Read More

166 Views
A Reuleaux triangle is a shape formed from the intersection of three circular disks, each having its center on the boundary of the other two. Its boundary is a curve of constant width, the simplest and best known such curve other than the circle itself. Constant width means that the separation of every two parallel supporting lines is the same, independent of their orientation. Because all its diameters are the same.The boundary of a Reuleaux triangle is a constant width curve based on an equilateral triangle. All points on a side are equidistant from the opposite vertex.To construct a Reuleaux triangleFormula for Reuleaux triangleArea of the Reuleaux ... Read More

111 Views
A Reuleaux triangle is a shape formed from the intersection of three circular disks, each having its center on the boundary of the other two. Its boundary is a curve of constant width, the simplest and best known such curve other than the circle itself. Constant width means that the separation of every two parallel supporting lines is the same, independent of their orientation. Because all its diameters are the same.The boundary of a Reuleaux triangle is a constant width curve based on an equilateral triangle. All points on a side are equidistant from the opposite vertex.To construct a Reuleaux ... Read More

140 Views
A Reuleaux triangle is a shape formed from the intersection of three circular disks, each having its center on the boundary of the other two. Its boundary is a curve of constant width, the simplest and best known such curve other than the circle itself. Constant width means that the separation of every two parallel supporting lines is the same, independent of their orientation. Because all its diameters are the same.The boundary of a Reuleaux triangle is a constant width curve based on an equilateral triangle. All points on a side are equidistant from the opposite vertex.To construct a Reuleaux ... Read More

133 Views
A Reuleaux triangle is a shape formed from the intersection of three circular disks, each having its center on the boundary of the other two. Its boundary is a curve of constant width, the simplest and best known such curve other than the circle itself. Constant width means that the separation of every two parallel supporting lines is the same, independent of their orientation. Because all its diameters are the same.The boundary of a Reuleaux triangle is a constant width curve based on an equilateral triangle. All points on a side are equidistant from the opposite vertex.To construct a Reuleaux ... Read More