Wednesday 10 November 2021

SCDL Android Mobile App Launched.

SCDL has launched SCDL APP.

One can apply for admissions through the SCDL APP.

Soon SCDL will launch access to various Student Services and Learning Facilities in phase two and phase three respectively.

One can download this SCDL App on an Android Phone Play store.

We wish you all the best in your journey with SCDL.


APP LINK:-  https://play.google.com/store/apps/details?id=com.dimakh.scdl

Saturday 6 November 2021

Symbiosis Centre for Distance Learning PGDBA Brochure-Scdl

Symbiosis Centre for Distance Learning PGDBA Brochure(SCDL)

If any queries or you have any doubts or if you need any clarification message us on Instagram @mdfaadhilofficial

Thursday 4 November 2021

C Program for swapping two numbers using pointers

C Program for swapping two numbers using pointers 

 

Program:-

#include<stdio.h>

void swap(int *num1, int *num2)

{

int temp;

temp = *num1;

*num1 = *num2;

*num2 = temp;

}

int main()

{

int num1, num2;

printf("\nEnter the first number : ");

scanf("%d", &num1);

printf("\nEnter the Second number : ");

scanf("%d", &num2);

swap(&num1, &num2);

printf("\nFirst number  : %d", num1);

printf("\nSecond number : %d", num2);

return (0);

}

 

Output:

Enter the first number  : 12

Enter the Second number : 22

First number  : 22

Second number : 12

 

C Program for Adding two numbers using Pointers

C Program for Adding two numbers using Pointers

Program:-

#include<stdio.h> 

int main()

{

int *ptr1, *ptr2;

int num;

printf("\nEnter two numbers : ");

scanf("%d %d", ptr1, ptr2);

num = *ptr1 + *ptr2;

printf("Sum = %d", num);

return (0);

}

 


Output:

Enter two numbers : 2 3

Sum = 5

C Program to create mark sheet of given students

C Program to create mark sheet of given students


Program 

#include <stdio.h>

#include <stdlib.h> 

/*structure declaration*/

struct student

{

char name[30];

int roll;

float perc;

};

 int main()

{

struct student *pstd;

/*Allocate memory dynamically*/

pstd=(struct student*)malloc(1*sizeof(struct student));

     

if(pstd==NULL)

{

 printf("Insufficient Memory, Exiting... \n");

 return 0;

 }

/*read and print details*/

printf("Enter name: ");

gets(pstd->name);

printf("Enter roll number: ");

scanf("%d",&pstd->roll);

printf("Enter percentage: ");

scanf("%f",&pstd->perc);

printf("\nEntered details are:\n");

printf("Name: %s, Roll Number: %d, Percentage: %.2f\n",pstd->name,pstd->roll,pstd->perc);

return 0;

}


Output:

Enter name: Mike    Enter roll number: 1

Enter percentage: 87.50         Entered details are:
Name: Mike,         Roll Number: 1,
Percentage: 87.50

 

 

 

C Program to find ascending and descending order of given number

C Program to find ascending and descending order of given number

Program

#include<stdio.h>

#include<conio.h>

void main()

{

 Int num[10],i,j,temp;

clrscr();

printf("\n Enter 10 values of an array.....\n");

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

scanf("%d",&num[i]);

printf("\n array before sort ....\n");

for(i=0;i<10;i++) printf("%d\t",num[i]);

for(i=0;i<9;i++) { for(j=i+1;j<10;j++)

 {

 if(num[i]<num[j])

{ temp=num[i];

num[i]=num[j]; num[j]=temp;

 }

 }

}

 printf("\n array after sort .........\n");

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

printf("%d\t",num[i]); getch();

}

 

 

 

Output:

 

Enter 10 values of an array:

5 4 8 7 2 3 9 6 0 1

 

Array before sort: 5 4 8 7 2 3 9 6  0 1

 

Array after sort: 9 8 7 6 5 4 3 2 1 0

 

C Program for dynamic memory allocations (Product of two matrices)

C Program for dynamic memory allocations (Product of two matrices)


Product of two matrices

Program:-

#include <stdio.h>
#include<conio.h>
void main()
{
 int a[3][3],b[3][3],c[3][3];
 int i,j,k,l = 1,m = 2;
 clrscr();
 printf("---------------Enter the first matrix A--------------\n");
 for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
gotoxy(l,m);
scanf("%d",&a[i][j]);
i = l+6;
}
m =  m+1;
l=1;
}
printf("---------------Enter the first matrix B---------------\n");
m=m+1;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
gotoxy(l,m);
scanf("%d",&b[i][j]);
i = l+6;
}
m = m+1;
l = 1;
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j] = 0;
for(k=0;k<3;k++)
{
c[i][j] += a[i][k] * b[k][j];
}
}
}
printf("\n\n----------The product of two matrix--------------- \n\n" );
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("\t%d\t",c[i][j]);
if(j==2)
{
printf("\n\n");
}
}
}
getch();
}
 
 
Output:

-----------------------Enter the first matrix A--------------

    1     2     3

    2     3     4

    3     4     5

 ----------------Enter the first matrix B---------------

    1     2     3

    3     4     5

    2     3     4

    ----------The product of two matrix---------------

 
    13              19              25

    19              28              37

    25              37              49
 
 

C Program to find Palindrome using recursion

C Program to find Palindrome using recursion

 

Program:-

#include <stdio.h>

#include<conio.h>

#include <math.h>

int reverse(int num);

int isPalindrome(int num); 

int main()

{

int num;     

printf("Enter any number: ");

scanf("%d", &num);

if(isPalindrome(num) == 1)

{

printf("%d is palindrome number.\n", num);

}

Else

{

printf("%d is NOT palindrome number.\n", num);

}

return 0;

}

int isPalindrome(int num)

{

if(num == reverse(num))

{

return 1;

}     

 return 0;

}

int reverse(int num)

{

int digit;     

if(num==0)

return 0;

digit = (int)log10(num)     

return ((num%10 * pow(10, digit)) + reverse(num/10));

}



Output:

Enter any number: 1221
1221 is palindrome
number.

 

C Program to find Factorial using recursion

C Program to find Factorial using recursion


Program 

#include <stdio.h> 

#include<conio.h>

long int factorial(int n)

{  

if(n==1)    return 1;

return n*factorial(n-1);

}

int main()

{

int num;

long int fact=0;     

printf("Enter an integer number: ");

scanf("%d",&num);     

fact=factorial(num);

printf("Factorial of %d is = %ld",num,fact);

printf("\n");  

return 0;

}

 


Output:-

Enter an integer number: 5
Factorial of 5 is = 120

C Program for Swapping using call by value method

C Program for Swapping using call by value method


Program:-        
#include <stdio.h>
#include<conio.h>
void swap(int, int);
int main()
{
int x, y;
printf("Enter the value of x and y\n");
scanf("%d %d", &x, &y);  
printf("Before Swapping x = %d y = %d\n", x, y);
swap(x, y);    
printf("After Swapping  x = %d  y = %d\n", x, y);
return 0;
}
void swap(int a,  int b)
{
int temp;   
temp = b;
b = a;
a = temp;
printf("Values of a and b is %d  %d\n", a, b);
}
 

Output:-
Enter the value of x and y : 4  6
Before Swapping x = 4 y =6
After Swapping  x = 6 y = 4

C Program to find sum of N numbers

 C Program to find sum of N numbers

Program:-

#include<stdio.h>

#include<conio.h>

int sum(int);
int main()
{
int num,s;
printf("enter value of n:");
scanf("%d",&num);
s = sum(num);
printf("sum of %d numbers = %d\n", num, s);
}
int sum(int num)
{
int i,sum=0;
for(i=0;i<=num;i++)
{
sum = sum + i;
 }
return sum;
}
 

Output:

enter value of n: 5
sum of %d numbers =15
google-site-verification: google18ae80885fc3d876.html