saving . . . saved Assignment has been deleted. Assignment has been hidden .
Assignment
Title
Question
Program

C-and-Cpp Scope-Of-Variables 08-09 min 0-10 sec 10-07-20, 7:35 p.m. Sakshichoudhary

Answers:

#include<studio.h>
int a=50;
int b=34;
void sub()
{
int diff;
diff=a-b;
printf("diff of a and b is %d\n,diff);
int main ()
{
Sub();
return 0;
}
10-07-20, 7:45 p.m. Sakshichoudhary
Output is as follow
diff of a and b is 16
10-07-20, 7:49 p.m. Sakshichoudhary

Login to add comment


#include<iostream>
using namespace std;
int a=50;
int b=34;
void sub()
{
int diff;
diff=a-b;
cout<<"diff of a and b is "<<diff<<"\n";
int main ()
{
Sub();
return 0;
}
10-07-20, 8 p.m. Sakshichoudhary
Output is as follow
diff of a and b is 16
10-07-20, 8:01 p.m. Sakshichoudhary

Login to add comment


<span style="background-color: rgb(255, 255, 255); color: rgb(34, 34, 34);">//assignment 1</span>
<span style="background-color: rgb(255, 255, 255); color: rgb(34, 34, 34);">#include<stdio.h></span>
int main()
{
printf("welcome to the world of C ");
return 0;
}
//Output: welcome to the world of C
Ans: cursor will blink on tha line only
10-07-20, 8:23 p.m. Bhagyajadhav


  Assignment 1
  name : manasi kasar
 
   #include<stdio.h>
   int main()
   {
    printf("welcome to the world of c");
    return 0;
   }
    
   //output: 
     welcome to the world of c
   ans: there is no change without using or using '\n' in the ''printf''
           statement,both output are same because there is single printf 
10-07-20, 10:13 p.m. 1921271242112


   //assignment 1
   #include<stdio.h>
   int main( ) 
   {
       Printf("Welcome to the World of C") ;
       return 0;
    }
   //output:Welcome to the World of C
   Ans:cursor will blink on that line only. 
11-07-20, 8:18 a.m. Ruks


#include<stdio.h>
void main() 
{
int a, b, diff;
clrscr();
printf ("enter the value of a, b") ;
scanf ("%d%d", &a,&b) ;
diff=a-b;
printf ("diff=%d", diff) ;
getch() ;
}
11-07-20, 9:14 a.m. 1921271242003


#include<stdio.h>
int a=9;
int b=4;
void sub() 
{
int sub;
Sub=a-b;
printf ("sub of a and b is%d\n", sub) ;
}
int main()
{
Sub() ;
return 0;
}

11-07-20, 9:17 a.m. 1921271242003
a=9 b=4
diff=5
11-07-20, 9:18 a.m. 1921271242003

Login to add comment


#include<iostream>
using namespace std;
int a=30;
int b=25;
void sub()
{
int diff;
diff=a-b;
cout<<"diff of a and b is "<<diff<<"\n";
int main ()
{
Sub();
return 0;
}


         Output is as follows
         diff of a and b is 5
11-07-20, 12:51 p.m. Pranitakotalwar


#include<studio.h>
int a=30;
int b=25;
void sub()
{
int diff;
diff=a-b;
printf("diff of a and b is %d\n,diff);
int main ()
{
Sub();
return 0;
}
<span class="meta">
</span>
Output is as follow
diff of a and b is 5
11-07-20, 12:56 p.m. Pranitakotalwar


//assignment 1
#include<stdio.h>
Int main()
{
    Print f("welcome to the world of c");
    return 0;
}
//output:Welcome to the world of c
 And: cursor will blink on the link only.

11-07-20, 3:43 p.m. msk692


// Assignment 5
// c program to check the difference between two number 

#include<stdio.h>
void main()
{
int a, b, diff;
printf(" enter the value of a and b\n");
scanf("%d%d", &a, &b);
diff=a-b;
printf("diff of a and b is =%d", diff);
getch();
 
Output as follows 
a=10
b=5
diff of a and b is=5
11-07-20, 5:06 p.m. Kirtana_maru


// Assignment 5
// c++ program  to check the difference between two number 

#include<iostream>
using namespace std ;
int a=10;
int b=5;
void sub() 
{
int diff;
diff=a-b;
cout<<"diff of a and b is"<<diff<<"\n";
int main() 
{
sub();
return 0;
}

Output as follows 
diff of a and b is 5

11-07-20, 5:15 p.m. Kirtana_maru


#include<stdio.h>
void main()
{
int a,b,diff;
clrscr();
printf("enter the value of a and b");
scanf ("%d%d",&a ,&b);
diff=a-b;
printf("diff of a and b is=%d", diff);
getch();
}
 

Output is as follows 
a=10
b=20
diff of a and b is =10

11-07-20, 5:26 p.m. 1921271242105


#include<iostream>
using namespace std;
int a=10;
int b=20;
void sub()
{
int diff;
diff=a-b;
cout<<"diff of a and b is"<<diff<<"\n";
}
int main ()
{
sub();
return 0;
}

Output is as follows 
diff of a and b is 10


11-07-20, 5:39 p.m. 1921271242105


#include<stdio.h>
void main ()
{
int a,b,diff;
clrscr();
printf ("enter the value of a and b");
scanf ("%d%d",&a,&b);
diff=a-b;
printf("diff of a and b is =%d",diff);
getch ();
}
Output of this program will be
a=10
b=5
diff of a and b is =5
11-07-20, 5:50 p.m. s19_more_sneha@mgmcen.ac.in


#include<iostream>
using namespace std;
int a=10;
int b=5;
void main ()
{
int diff;
diff=a-b;
cout<<"diff of a and b is "<<diff<<"\n";
}
int main ()
{
sub ();
return 0;
}
Output of this program will be
diff of a and b is 5

11-07-20, 5:59 p.m. s19_more_sneha@mgmcen.ac.in


// Assignment 1
#include<stdio.h>
{
  printf("Welcome to  the world of C");
  return 0;
}
// output : Welcome to the world of C
   Ans : Cursor will blink on that line
11-07-20, 10:32 p.m. Akshayavarni


// Assignment 1
#include<stdio.h>
{
  printf("Welcome to  the world of C");
  return 0;
}
// output : Welcome to the world of C
   Ans : Cursor will blink on that line
11-07-20, 10:32 p.m. Akshayavarni


// Assignment 1
#include<stdio.h>
{
  printf("Welcome to  the world of C");
  return 0;
}
// output : Welcome to the world of C
   Ans : Cursor will blink on that line
11-07-20, 10:32 p.m. Akshayavarni


#include<iostream>
using namespace std;
int a=25;
int b=10;
void main()
{
  int diff;
  diff=a-b;
  cout<<"diff of a and b is"<<diff<<"\n";
}
int main()
{
  sub();
  return 0;
}



*****Output*****

diff of a and b is 15
14-07-20, 6:23 p.m. RPD


#include<iostream>
using namespace std;
int a=10;
int b=5;
void main ()
{
int diff;
diff=a-b;
cout<<"diff of a and b is "<<diff<<"\n";
}
int main ()
{
sub ();
return 0;
}
Output of this program will be
diff of a and b is 5

15-07-20, 9:48 p.m. 1921271242121


#include<stdio.h>
void main ()
{
int a,b,diff;
clrscr();
printf ("enter the value of a and b");
scanf ("%d%d",&a,&b);
diff=a-b;
printf("diff of a and b is =%d",diff);
getch ();
}
Output of this program will be
a=10
b=5
diff of a and b is =5
27-07-20, 11:28 a.m. S19_bansode_pooja@mgmcen.ac.in


#include<studio.h>
main()
{
int a,b,d;
//d for difference between two  numbers
Printf("enter a value of a and b "\n);
scanf("%d%d",&a,&b);
d=a-b;
Printf("difference of a and b is=%d",d);
getch();





C++
#include<iostream>
Using namespace std;
void main()
{
Int a =15 , b=5;
Int sub;
Sub=a-b;
cout<<"difference of a and b is"<<sub<<"\n";
}
Int main ()
}
sub ()
}




15-09-20, 10:20 a.m. Shruti@123


Log-in to answer to this question.