Tuesday, June 27, 2023

C Program-Interview based Aptitude-Solved Programs

 Sample 1

#include<stdio.h>
int main()
 
{
int a=10,b;
float c;  
b=++a;
printf("%d %d\n",a,b);
printf("%d",sizeof(a));
return 0;
}
 


OUTPUT: 11 11

Sample 2

#include<stdio.h>
int main()
{
int a,b=5,c=7; 
a=printf("%d%d",b,c);
 
printf("%d",a);
}


 

OUTPUT: 5 7

Sample 3


#include<stdio.h>
void main()
 
{
 
int m,n,p,r;
 r=scanf("%d%d%d",&m,&n,&p); 
printf("%d",r);
 
}

 
OUTPUT: 5 6 8


No comments:

Post a Comment