Quantcast
Channel: C
Browsing latest articles
Browse All 46 View Live
↧

InFix to PostFix and PostFix expression evaluation.

InFix to PostFix Introduction Infix Expression : Notation in which the operator separates its operands. Eg (a + b) * c. Infix notation requires the use of brackets to specify the order of evaluation....

View Article


Error Handling in C

Error handling has always been dominantly vital in programming. It has become a bit more sophisticated with the object oriented languages, however even in the system programming language like C, error...

View Article


Working with Bitwise Operators

As it is said, great things are in small ones. Its someway true in C as well. Working on bits rather than bytes, and other bigger data structures leverage implementations in speed and space efficiency....

View Article

A Beginner's Guide to Pointers

Introduction Definition: Pointer is a variable which stores address of another variable. To understand this definition properly, let us separate it into two statements: 1. Pointer is a variable. 2. It...

View Article

Strings in C

Strings are paramount datatype for any real use case scenario. However, in C, there is no basic datatype as ‘string’. A string is understood as a collection set of characters i.e. in programmatic...

View Article


Calculator program in C

The below code is a calculator in plain C. It does not take into account the operability of bodmas but just one operation at a time. The main thing in the source code below in the scanf which scans the...

View Article

ATOI and ITOA Custom Implementations

I wanted to make a remake of my previous BAD versions of these 2 functions. I think they are working great now, and they're portable the same as the originals from STD library. ATOI Code: /** // By 85...

View Article

Simplex and Dual Simplex Method

C Program to solves linear programming problem or LPP by "SIMPLEX" and "DUAL SIMPLEX" method. The code Simplex Method Code Code: #include <stdio.h> #include <conio.h> #define INFINITY 999...

View Article


Solution to Problem When using scanf() before fgets() or gets() in C

There are a certain functions in C, which if used in a particular combination may cause problems. These problems are due to the conflicting behaviors of the functions. In this article, we will...

View Article


Conditional Statements in C - if else break continue switch

Conditional statements are statements, which are executed depending on some condition being satisfied as true or false. In this tutorial, we will try to learn some conditional statements which include:...

View Article

Loops in C - for while do while and goto

Loops are the basic logic building structures in computer programming. It is a way of executing statement(s) repeatedly in specified times, which is termed as iteration. Here different types of loops...

View Article

C Arrays

Array is a data structure consists of a group of elements of same data type. We can think it as collection of variable of similar data type. Array prototype: Code: Data_type array_name[array_size]...

View Article

Custom Data Types in C - struct, union and typedef

There are many built in data types in C. But sometimes, the built in data types are not enough to perform the required tasks. In that case, some custom data type can be built to meet the necessary...

View Article


C Functions

Function is a block of statements that performs a specific task. It is reusable portion of the code and a very effective way to modularize your program. For example, you may need to perform different...

View Article

Understanding C File Handling Functions With Examples

Data files are very essential part of in computer programming. The data we use while programming using the variables of different data types, are unavailable after the program execution. So,there is no...

View Article


CHATBOT IN C

I've some project for collage.. I have to make a simple chatbot program in C. Does anyone have any experience with same project?

View Article

Implement strcpy function

Hi, I want to implement strcpy function, but something is go wrong. I have made debug and the code works until execute the function. I receive an error something with segmentation fault. Thank you....

View Article


100 Multiple choice questions in C

/*question number 1*/ Code: int z,x=5,y=-10,a=4,b=2; z = x++ - --y * b / a; What number will z in the sample code above contain? Choice 1 5 Choice 2 6 Choice 3 10 [Ans] Corrected by buddy by running...

View Article

Can anyone solve this

Write a modular C program that accepts by keyboard input five (5) user-scores of the PS5 gaming console. The program must repeatedly request from each user, ratings on the following factors of the PS5...

View Article

How many prime numbers are there in this sequence

I'm writing a program to calculate the number of prime numbers in a sequence. There's a variable called num that is given and then the program must calculate how many prime numbers there are from 2...

View Article
Browsing latest articles
Browse All 46 View Live