Tags » Advanced C#

4. User Defined Functions

Introduction

A function is a block of code that performs a particular task. There are times when we need to write a particular block of code for more than once in our program. 630 more words

Advanced C

2. A program to find out largest and second largest element from the array of 10 elements.

INPUT

#include<stdio.h>

#include<conio.h>

#include<limits.h>

#define MAX_SIZE 1000

void main ()

{

int arr, N,i;

          int max1, max2;

          clrscr();

          printf(“Enter size of the array(1-1000):”);

          scanf(“%d”,&N);

          printf(“Enter elements in the array:”); 77 more words

Advanced C

1. A program to create an array dynamically of N number. Accept N number from the user and print array element in reverse.

INPUT

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i,a;

clrscr();

     printf(“Enter the range: \n”);

     scanf(“%d”, &n);

     printf(“Enter the number: \n”);

     for(i=0; i<n; i++)

     {

               scanf(“%d”, &a[i]); 25 more words

Advanced C

3. Structure & Union

Introduction

                           So far we seen array which is a collection of variables having same data-types such as int, float or char, which means we cannot create a collection of variables with different data-types using array. 2,533 more words

Advanced C

2. Arrays

Introduction to Array

Definition

An array is a fixed-sized sequenced collection of elements having same Data type. Array is a part of derived data type. 1,274 more words

Advanced C

1. Pre-processor Directives

 Introduction to Pre-Processor Directives

  •  Before a C program is compiled in a compiler, source code is processed by a program called pre-processor. This process is called pre-processing.
  • 1,166 more words
Advanced C

A friendly type predicate

This is a sequel to the previous post on writing a custom type predicate. One of the readers on Reddit made a very insightful observation. The user has implemented a type that she intends to use with our library, call it… 2,368 more words

Programming