Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Commit 658728e

Browse files
committed
files of BHU added
1 parent 5689d89 commit 658728e

11 files changed

Lines changed: 355 additions & 15 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
#include <stdio.h>
3+
#include <stdlib.h>
4+
struct item{
5+
int m;
6+
float x;
7+
char c[2];
8+
} lol;
9+
int main()
10+
{
11+
/*
12+
int m=1,k=0;
13+
14+
do{
15+
k++;
16+
m=m+2;
17+
if(m%2!=0)
18+
break;
19+
else
20+
printf("%d",m);
21+
}while(m<10);
22+
printf("\nk = %d",k);
23+
*/
24+
/*
25+
char address[80];
26+
scanf("%[a-z]",address);
27+
printf("%-80s\n\n",address);
28+
*/
29+
/*
30+
float y;
31+
y = 98.7654;
32+
printf("%-7.2f",y);
33+
*/
34+
/*
35+
static int b[] = {10,20,30,40,50};
36+
int i;
37+
for(i=0;i<=4;i++){
38+
printf("%d ",i[b]);
39+
}
40+
*/
41+
/*
42+
int a = 5,c=9,b=2;
43+
b *= a+c;
44+
printf("%d",b);
45+
*/
46+
/*
47+
char a[10];
48+
printf("size = %d",sizeof(float));
49+
*/
50+
return 0;
51+
}

1st_and_2nd_Sem_c_backup/C/BHU/2017/q1.c

Lines changed: 253 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11

22
#include <stdio.h>
33
#include <stdlib.h>
4-
4+
//#define a +01.20001 e+3
5+
//#define b 5z1.15
6+
//#define int char
7+
//#define a 10
8+
/*
9+
#define FALSE -1
10+
#define TRUE 1
11+
#define NULL 0
12+
*/
13+
/*
514
int main()
615
{
16+
//printf("a = %f ",a);
17+
//printf("b = %d",b);
718
/*
819
int num1, num2, num3;
920
scanf("%2d %5d",&num1,&num2);
@@ -26,6 +37,7 @@ int main()
2637
if(var)
2738
main();
2839
*/
40+
/*
2941
int c[] = {2.8,3.4,4,6.7,5};
3042
int j,*p=c,*q=c;
3143
for(j=0;j<5;j++)
@@ -40,6 +52,245 @@ int main()
4052
printf("%d",*p);
4153
++p;
4254
}
55+
*/
56+
/*
57+
int i=-1,j=-1,k=0,l=2,m;
58+
m=i++&&j++&&k++||l++;
59+
printf("%d%d%d%d%d",i,j,k,l,m);
60+
*/
61+
//int *p;
62+
//int *k;
63+
/*
64+
printf("%d\n",k);
65+
printf("%d%d",sizeof(*p),sizeof(p));
66+
*/
67+
/*
68+
int i =3;
69+
switch(i)
70+
{
71+
default:printf("zero!");
72+
case 3: printf("three!");
73+
break;
74+
case 1: printf("one!");
75+
break;
76+
}
77+
*/
78+
//int c = - -2;
79+
//int i = 65;
80+
//printf("c=%d",c);
81+
//printf("sizeof(i)=%d",sizeof(i));
82+
/*
83+
int i=10;
84+
i=!i>14;
85+
86+
printf("i=%d",i);
87+
*/
88+
//printf("\nab");
89+
//printf("\bsi");
90+
//printf("\rha");
91+
/*
92+
printf("\n123");
93+
printf("\b456");
94+
printf("\r789");
95+
*/
96+
//int i=5;
97+
//printf("%d %d %d %d %d",i++,i--,++i,--i,i);
98+
//#define a 50
99+
//printf("%d",a);
100+
//int i=400,j=300;
101+
//printf("%d..%d");
102+
//int i;
103+
//printf("%d",scanf("%d",&i));
104+
105+
106+
// 2017 Q-18 start
107+
/*
108+
int i=-1;
109+
-i;
110+
printf("i=%d,+i=%d\n",i,+i);
111+
*
112+
/*
113+
char *str1 = "abcd";
114+
char str2[] = "abcd";
115+
printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));
116+
*/
117+
/*
118+
char not;
119+
not =!2;
120+
printf("%d",not);
121+
*/
122+
/*
123+
if(NULL)
124+
puts("NULL");
125+
else if(FALSE)
126+
puts("TRUE");
127+
else
128+
puts("FALSE");
129+
*/
130+
/*
131+
if(-5)
132+
puts("TRUE!");
133+
*/
134+
/*
135+
int k=1;
136+
printf("%d == 1 is""%s",k,k==1?"TRUE":"FALSE");
137+
*/
138+
/*
139+
int y;
140+
scanf("%d",&y);
141+
if((y%4==0 && y%100!=0)||y%100==0)
142+
printf("%d is a leap year");
143+
else
144+
printf("%d is not a leap year");
145+
*/
146+
/*
147+
int *j;
148+
{
149+
int i=10;
150+
j=&i;
151+
}
152+
printf("%d",*j);
153+
*/
154+
/*
155+
register i=5;
156+
char j[] = "hello";
157+
printf("%s %d",j,i);
158+
*/
159+
/*
160+
int i=5,j=6,z;
161+
printf("%d",i+++j);
162+
*/
163+
/*
164+
int i;
165+
for(i=1;i<4;i++)
166+
{
167+
switch(i)
168+
case 1:printf("%d",i);break;
169+
{
170+
case 2:printf("%d",i);break;
171+
case 3:printf("%d",i);break;
172+
}
173+
switch(i) case 4:printf("%d",i);
174+
}
175+
*/
176+
/*
177+
int i = _1_abc(10);
178+
printf("%d\n",--i);
179+
*/
180+
181+
/*
182+
int i=0,j=0,k=0;
183+
184+
if(i++&&j++&&k++)
185+
printf("%d..%d lol",i++,j);
186+
printf("%d..%d..%d",i,j,k);
187+
*/
188+
/*
189+
int i=0;
190+
while(+(+i--)!=0)
191+
i-=i++;
192+
printf("%d",i);
193+
*/
194+
/*
195+
int i,j;
196+
j=(int)2.9/3;
197+
printf("j = %d",j);
198+
*/
199+
/*
200+
j=0;
201+
for(i=0;i<=5;i=i+2/3)
202+
{
203+
j=j+1;
204+
printf("j = %d",j);
205+
}
206+
*/
207+
208+
//m,n,z: INTEGER;
209+
//long float tem;
210+
/*
211+
int c=0,d=5,e=10,a;
212+
a=c>1?d>1||e>1?100:200:300;
213+
printf("a = %d",a);
214+
*/
215+
/*
216+
int j,x;
217+
x=0;
218+
for(j=0;j<=5;j++)
219+
{
220+
switch(j+1)
221+
{
222+
case 0:
223+
case -1:
224+
x+=1;
225+
break;
226+
case 1:
227+
case 2:
228+
case 3:
229+
x+=2;
230+
break;
231+
default:
232+
x+=3;
233+
}
234+
printf("%d",x);
235+
}
236+
*/
237+
/*
238+
int size=5;
239+
int arr[5] = {1,2,3,4,5};
240+
for(int i=1;i<=size;i++)
241+
{
242+
if(i>3)
243+
break;
244+
else
245+
printf("\n%d",arr[i]);
246+
continue;
247+
}
248+
*/
249+
/*
250+
int num1,num2;
251+
scanf("%2d %5d",&num1,&num2);
252+
printf("%d %d",num1,num2);
253+
*/
254+
/*
255+
int num1,num2,num3;
256+
scanf("%d %*d %d",&num1,&num2,&num3);
257+
printf("%d %d",num1,num2);
258+
*/
259+
// 123 456 789 112 115 118
260+
/*
261+
int n1,n2,n3,n4,n5;
262+
scanf("%d %*d %d, %d %d",&n1,&n2,&n3,&n4,&n5);
263+
printf("%d %d %d %d %d",n1,n2,n3,n4,n5);
264+
*/
265+
/*
266+
int a,val=7,k;
267+
//float b;
268+
//char name[30];
269+
//val = scanf("%d %f %s",&a,&b,name);
270+
k = printf("%d",val);
271+
printf("%d",k);
272+
*/
273+
//int k;
274+
//int i;
275+
//printf("%06d",9876);
276+
277+
//int x,y,z;
278+
//z = (x=10, y=5, x+y++);
279+
//z = (x=100,y = 6);
280+
281+
//printf("%d",z);
282+
/*
283+
int a[5] = {1,2,3,4,5};
284+
printf("%d\n",*(a+4));
285+
printf("%d\n",a[4]);
286+
43287
return 0;
44-
}
45288
289+
}
290+
*/
291+
/*
292+
int _1_abc(int i)
293+
{
294+
return (i++);
295+
}
296+
*/

1st_and_2nd_Sem_c_backup/C/BHU/BHU.cbp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@
3131
<Compiler>
3232
<Add option="-Wall" />
3333
</Compiler>
34+
<Unit filename="2015/questions.c">
35+
<Option compilerVar="CC" />
36+
</Unit>
37+
<Unit filename="2017/q1.c">
38+
<Option compilerVar="CC" />
39+
</Unit>
40+
<Unit filename="2018/q1.c">
41+
<Option compilerVar="CC" />
42+
</Unit>
3443
<Unit filename="main.c">
3544
<Option compilerVar="CC" />
3645
</Unit>

1st_and_2nd_Sem_c_backup/C/BHU/BHU.depend

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
1557338074 source:/home/jimutbp/Desktop/GIT/prog_backups/1st_and_2nd_Sem_c_backup/C/BHU/main.c
77

8-
1557343011 source:/home/jimutbp/Desktop/GIT/prog_backups/1st_and_2nd_Sem_c_backup/C/BHU/2017/q1.c
8+
1557407951 source:/home/jimutbp/Desktop/GIT/prog_backups/1st_and_2nd_Sem_c_backup/C/BHU/2017/q1.c
9+
<stdio.h>
10+
<stdlib.h>
11+
12+
1557409074 source:/home/jimutbp/Desktop/GIT/prog_backups/1st_and_2nd_Sem_c_backup/C/BHU/2015/questions.c
913
<stdio.h>
1014
<stdlib.h>
1115

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2+
<CodeBlocks_layout_file>
3+
<FileVersion major="1" minor="0" />
4+
<ActiveTarget name="Debug" />
5+
<File name="2018/q1.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="4" zoom_2="0">
6+
<Cursor>
7+
<Cursor1 position="651" topLine="24" />
8+
</Cursor>
9+
</File>
10+
<File name="main.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
11+
<Cursor>
12+
<Cursor1 position="1" topLine="0" />
13+
</Cursor>
14+
</File>
15+
<File name="2017/q1.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="3" zoom_2="0">
16+
<Cursor>
17+
<Cursor1 position="0" topLine="0" />
18+
</Cursor>
19+
</File>
20+
<File name="2015/questions.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="3" zoom_2="0">
21+
<Cursor>
22+
<Cursor1 position="596" topLine="30" />
23+
</Cursor>
24+
</File>
25+
</CodeBlocks_layout_file>
1.25 KB
Binary file not shown.
5.29 KB
Binary file not shown.
4.02 KB
Binary file not shown.
4.02 KB
Binary file not shown.
1.23 KB
Binary file not shown.

0 commit comments

Comments
 (0)