Largest and Smallest Element of an Array in C

Calculating largest and smallest element in C is straightforward. All you have to do is scan through the array one element ... This code is also available in GitHub. (adsbygoogle = window.adsbygoogle || []).push({}); Loading...

Pascal’s Triangle using C program

Printing Pascal’s Triangle is famous problem in C. You may be familiar with the Pascal triangle from the Math class when yo ... iangle is the sum of the two directly above it.” This is illustrated by the following GIF image taken from Wikipedia.

Numerical Methods: Multiplication of two matrices using two dimensional array in C

Let we have two 2 x 2 matrices A and B \[ A = \begin{bmatrix} a_{00} & a_{01}\\ a_{10} & a_{11} \end{bmatrix} \tex ... printf("Matrix multiplication impossible"); } printf("Enter the first matrix: \n"); for(i = 0; i

C Programming: File Handling

The console function like printf() and scanf() have been used for input/output .This scheme is adequate if the volume of ... ry file for read/write 11 “w+b” Create a binary file for read/write 12 “a+b” Append a binary file for read/write

Font rendering in glut using bitmap fonts with sample example

Font Rendering in Glut on MS Windows A quick look at some of the new features available in the latest versions of Microsoft ... g sample example fonts in your application project, you can obtain good results without the use of professional designers.

Simulation of Non-deterministic finite state automata using backtracking feature of prolog.

Let us now see how the features of prolog can be used to simulate a non-deterministic automata which would have been a ...   silent(S,S1),     accepts(S1,X).GOAL Accepts(S,[a,b]). (adsbygoogle = window.adsbygoogle || []).push({});

Rendering cones glutsolidcone and glutwirecone using glut in c

Creating With Artists Oil Paintings, Drawing, And Acrylic Paintings Rendering cones and glutwirecones are used for many of t ... e of options for creating art. To find out more about glutsolidocc and glutwirecones, visit the Glutepixels website today.

C Programming: User define functions

A function in C can be taken as function in mathematics like sin(x), x^2+2x+6 etc. You supply the value of variable x and ... oogle || []).push({}); function_name(parameter list); The solution of different problems is given in successive posts

Font rendering in GLUT using bitmap fonts with Sample example.

GLUT supports two type of font rendering: stroke fonts, meaning each character is rendered as a set of line segments; and ...     glutDisplayFunc(display);     glutTimerFunc(25, update, 0);     glutMainLoop();     return EXIT_SUCCESS; } Output

Sum of two matrices using two dimensional array in C

Matrix is the perfect example of a two-dimensional array. It has row and column. A row represents one dimension and colum ... toi(argv[2]); // allocate memory for matrices matrix1 = (int**) malloc (sizeof(int*) * columns); for (i = 0; i

Difference between Arrays and Structures in C

Both the arrays and structures are classified as structured data types as they provide a mechanism that enables us to acc ... google || []).push({}); Difference between Array and Pointer in C/C++ Maximum and Minimum elements of an Array

Adding two complex numbers using Structure in C

Simple algebraic addition does not work in the case of Complex Number. Because they have two parts, Real and Imaginary. ... sum_complex(comp1,comp2); printf("The sum is %.2f + i%.2f\n\n", result.real,result.imag); return 0; } Output

Rendering Cones glutSolidCone and glutWireCone using GLUT in C

GLUT provides function glutSolidCone to render a Solid Cone and glutWireCone to render a Wire Frame Cone. glutSolidCone a ... ar);     glMaterialfv(GL_FRONT, GL_SHININESS, high_shininess);     glutMainLoop();     return EXIT_SUCCESS; } Output

C Programming: Dynamic Memory Allocation (DMA)

C language requires the number of elements in an array to be specified at compile time. But we may not be able to do so alw ... mory for future use, using the free function: free(ptr); (adsbygoogle = window.adsbygoogle || []).push({});

C Programming: What is C? Why it Needed?

C is a powerful, flexible, portable and elegantly structured programming language. Since C combines the features of hig ... hly structured. The modular programming makes testing and debugging easier. C has ability to extends itself.

3D Transformation [Translation, Rotation and Scaling] in C/C++

Translation In a three-dimensional homogeneous coordinates representation, a point is translated from position P = (x, y, ...         default:             break;     }     return 0; } (adsbygoogle = window.adsbygoogle || []).push({});

Data Structure: How to implement Merge Sort in C++?

Merging is the process of combining two or more sorted files into a third sorted file. Merge sort is based on the divide ... omparisons, the merge sort requires no more than nlogn comparisons.  Hence the efficiency of merge sort is O(nlogn).

C Programming: Writing My First Program in C. How to Write Simple Program in C.

In stead of going through different parts of C programming like Data Type, Variables, Functions, Arrays directly, I first W ... un option. The following output window will be displayed. (adsbygoogle = window.adsbygoogle || []).push({});

First Time Visitor

Hello everyone this is Bibek Subedi from Nepal. My blog https://programming-technique.blogspot.com consists of tutorials ... ried to make all the codes error free as much as I can.  (adsbygoogle = window.adsbygoogle || []).push({});

How to make Vertex Table, Edge Table and Surface Table to store geometric information of an object??

Listing the geometric data in three tables provides a convenient reference to the individual components of each object. Al ... Every edge is part of at least one polygon 3.  Each polygon has at least one shared edge. 4.  Every surface is close.