Welcome to Millillion Tech

Millillion Tech is not a only blog, it is a landmark of technological knowledge.

Translate

Wednesday, May 27, 2015

C Programming, using linked list creating multi nodes

#include<stdio.h>#include<conio.h>struct test_struct{    int val;    struct test_struct *next;};struct test_struct *head=NULL;struct test_struct *curr=NULL;struct test_struct* create_list(int val){    struct test_struct *ptr=(struct test_struct*) malloc(sizeof(struct test_struct));    if(ptr==NULL)    {        printf("Node...

C programming, using linked list creating a node

#include<stdio.h>#include<conio.h>struct test_struct{    int val;    struct test_struct *next;};struct test_struct *head=NULL;struct test_struct *curr=NULL;struct test_struct* create_list(int val){    struct test_struct *ptr=(struct test_struct*) malloc(sizeof(struct test_struct));    if(ptr==NULL)    {        printf("Node...

Monday, May 25, 2015

Using structure, input some students' Name, Id and CGPA and sort them by Name, Id and CGPA respectively.

#include<stdio.h>#include<string.h>#define SIZE 5struct diu_cse{    char name[20];    int id;    float cgpa;};struct diu_cse student[SIZE];void input(struct diu_cse student[]){    int i;    printf("***********Input************\n");    for(i=0;i<SIZE;i++){        scanf("%s%d%f", student[i].name, &student[i].id,...

Friday, May 22, 2015

Using C, Input a string and check that it is palindrome or not.

#include <stdio.h>#include <string.h>void main(){    char str[25], rev_str[25] = {'\0'};    int i, len = 0, flag = 0;    printf("Enter a string: ");    gets(str);    for (i = 0; str[i] != '\0'; i++){        len++;    }    for (i = len - 1; i >= 0 ; i--){       ...

C programming code for Prime number.

#include<stdio.h> int main() {    int n, i = 3, count, c;    printf("Enter the number of prime numbers required\n");    scanf("%d",&n);    if ( n >= 1 )    {       printf("First %d prime numbers are :\n",n);       printf("2\n");    }    for ( count = 2 ; count <= n ;  )    {      ...

Wednesday, May 20, 2015

C programming code for Fibonacci Series

#include<stdio.h> int main() {    int n, first = 0, second = 1, next, c;    printf("Enter the number of terms\n");    scanf("%d",&n);    printf("First %d terms of Fibonacci series are :-\n",n);    for ( c = 0 ; c < n ; c++ )    {       if ( c <= 1 )          next = c;       else      ...

C Programming Buble Sorting

#include<stdio.h>#include<conio.h>int main( ){     int a[100];     int i, j, temp, n ;     printf("How many numbers you want to sort : \n");     scanf("%d",&n);     printf("Enter %d numbers\n", n);     for(j=0; j<n; j++)     scanf("%d",&a[j]);     for(j=0;j<n-1;j++)    ...

একটি C Programming Code লিখ যা একটি Array তে ৫টি Integer ইনপুট নিবে। এখন ওগুলোর Average, Maximum, Minimum বের কর, Reverse Order এ সাজাও এবং ছোট থেকে বড় ক্রমে Sort কর।

#include<stdio.h> #define SIZE 5 void main() {     int arr[SIZE], max=0, min=arr[0], i, j, k, l, temp=0;     float avrg, sum=0;     printf("Enter 5 integers: ");     for(i=0;i<5;i++){         scanf("%d", &arr[i]);         sum = sum+arr[i];         if(arr[i]>max)            ...

...