Mithlesh Upadhyay

Mithlesh Upadhyay is a Computer Science and AI expert from Madhya Pradesh with strong academic background (BE in CSE and M.Tech in AI) and over six years of experience in technical content development. He has contributed tech articles, led teams, and worked in Full Stack Development and Data Science. He founded the w3colleges.org portal for learning resources.

Author Archives: Mithlesh Upadhyay

k-th distinct (non-repeating) element in an Array

Given an integer array arr[] a non negative integer k, print k-th distinct element in an array. The given array may contain duplicates and the output should print k-th distinct element among all elements in the array. If k is more than number of distinct elements, print -1. Examples : Input : arr[] = {1, 2, 1, 3,… Read More »

Snake and Ladder Pattern Formation

Design the pattern as represented in the famous snake and ladders game. Your task is to print the pattern as represented in snake and ladders game for a given integer input N, where N denotes the number of rows and columns of the pattern array. Note: N given will be always even. Examples: Input: N=4 Output: 7 8… Read More »

Career in C/C++

In this article, we will discuss the various opportunities available to a person who is well-equipped with the necessary skills in C / C ++ language. C and C ++ programming languages ​​are old, but still popular among computer science people. Even a person with a non-technical background has heard of these languages. C is popular due to… Read More »

Addition of two numbers in C++

In this article, we have discussed various methods to add two numbers in C++. These are simple program, you can learn them easily. Method-1 : With Hardcoded Inputs Output: 11 Method-2 : With user Inputs Output: Output depends on user inputs, that will be sum of both numbers. Method-3 : With class Output: Output depends on user inputs,… Read More »

Introduction of Array Data Structure

Array is collection of items having same data type stored in contiguous memory location. An array is derived data type in C programming language which can store similar types of data in contiguous memory locations. Data may be primitive type, (i.e., int, char, float, double), address of union, structure, pointer, function or another array. Array implementation is important… Read More »

Difference between C and C++

1. C language : C was developed by Dennis Ritchie between the year 1969 and 1973 at AT&T Bell Labs to write Operating System. It is a procedural programming language and does not support classes and objects. 2. C++ language : C++ was developed by Bjarne Stroustrup in 1979. It has imperative, object-oriented and generic programming features. C++… Read More »

Identifier Naming rules in C language

Prerequisite – C Language Introduction In C any name is called identifier. This name can be: 1. Variable name 2. Function name 3. Enum constant name 4. Micro constant name 5. Goto label name And, any other data type name like, 6. Structure 7. Union 8. Enum names or Typedef name These are following rules that should follow:… Read More »