├── 27_C.ppt ├── 9781423902096_PPT_ch02.ppt ├── 9781423902096_PPT_ch03.ppt ├── 9781423902096_PPT_ch04.ppt ├── 9781423902096_PPT_ch05.ppt ├── 9781423902096_PPT_ch06.ppt ├── 9781423902096_PPT_ch07.ppt ├── 9781423902096_PPT_ch08.ppt ├── 9781423902096_PPT_ch09.ppt ├── Basics of C.ppt ├── C++_programs.ppt ├── CLOCK.C ├── CLOCKP3.BAK ├── CLOCKP3.CPP ├── Chap-02-1.ppt ├── Introduction-to-C-Part-1.pptx ├── Introduction-to-C-Program.9249163.powerpoint.pptx ├── Learn-C-Programming-Lan.7570924.powerpoint.pptx ├── M200.BAK ├── M200.CPP ├── M201.BAK ├── M201.C ├── M202.BAK ├── M202.C ├── M203.BAK ├── M203.C ├── M204.C ├── M205.BAK ├── M205.C ├── M206.BAK ├── M206.C ├── M207.BAK ├── M207.C ├── M208.BAK ├── M208.C ├── M45.BAK ├── M45.C ├── M45.CPP ├── M46.BAK ├── M46.C ├── M46.CPP ├── M47.C ├── M47.CPP ├── M48.BAK ├── M48.C ├── M48.CPP ├── M49.BAK ├── M49.C ├── M49.CPP ├── M50.BAK ├── M50.C ├── M50.CPP ├── M51.C ├── M51.CPP ├── M52.C ├── M52.CPP ├── M53.BAK ├── M53.C ├── M53.CPP ├── M54.C ├── M54.CPP ├── M55.C ├── M55.CPP ├── M56.BAK ├── M56.C ├── M56.CPP ├── M57.BAK ├── M57.CPP ├── M58.BAK ├── M58.CPP ├── M59.BAK ├── M59.CPP ├── M60.BAK ├── M60.CPP ├── M61.CPP ├── M62.BAK ├── M62.CPP ├── M63.BAK ├── M63.CPP ├── M64.CPP ├── M65.CPP ├── M66.BAK ├── M66.CPP ├── M67.BAK ├── M67.CPP ├── M68.BAK ├── M68.CPP ├── M71.BAK ├── M71.C ├── M72.BAK ├── M72.C ├── M73.BAK ├── M73.C ├── M74.BAK ├── M74.C ├── M75.BAK ├── M75.C ├── M76.BAK ├── M76.C ├── M77.BAK ├── M77.C ├── M78.BAK ├── M78.C ├── M79.BAK ├── M79.C ├── M80.BAK ├── M80.C ├── M81.BAK ├── M81.C ├── M82.BAK ├── M82.C ├── M83.BAK ├── M83.C ├── M84.BAK ├── M84.C ├── M85.BAK ├── M85.C ├── M89.C ├── M91.BAK ├── M91.C ├── M92.BAK ├── M92.C ├── M93.BAK ├── M93.C ├── M94.C ├── M95.BAK ├── M95.C ├── M96.C ├── M97.BAK ├── M97.C ├── M98.BAK ├── M98.C ├── MADHU.C ├── MADHU123.CPP ├── MADHU2.C ├── MADHU3.C ├── MADHU7.C ├── MADHU8.C ├── MADHU9.C ├── MAKE.EXE ├── MAKER.EXE ├── MANIP.BAK ├── MANIP.CPP ├── MANJU.CPP ├── MARCH1.BAK ├── MARCH1.C ├── MARCH2.C ├── MAT.BAK ├── MAT.C ├── MAT.CPP ├── MATC.BAK ├── MATC.C ├── MATH.CPP ├── MATPR.BAK ├── MATPR.C ├── MATPRO.BAK ├── MATPRO.CPP ├── MATRIX.BAK ├── MATRIX.C ├── MATRIX.CPP ├── MATRIX1.BAK ├── MATRIX1.C ├── MATRIXSU.BAK ├── MATRIXSU.CPP ├── MAT_SUM.BAK ├── MAT_SUM.C ├── MEGHA123.CPP ├── MEGHA444.CPP ├── MEGHA555.CPP ├── MK.C ├── MM1.BAK ├── MM1.C ├── MM10.C ├── MM11.C ├── MM12.BAK ├── MM12.C ├── MM13.C ├── MM14.BAK ├── MM14.C ├── MM2.C ├── MM3.C ├── MM4.BAK ├── MM4.C ├── MM5.BAK ├── MM5.C ├── MM6.BAK ├── MM6.C ├── MM7.BAK ├── MM7.C ├── MM8.C ├── MM9.C ├── MR123.CPP ├── MULTILEV.BAK ├── MULTILEV.CPP ├── MULT_CON.BAK ├── MULT_CON.CPP ├── MULT_INH.BAK ├── MULT_INH.CPP ├── MYFILE1.BAK ├── MYFILE1.C ├── N.CPP ├── N1.C ├── N1.CPP ├── N2.C ├── N2.CPP ├── N25.CPP ├── N3.BAK ├── N3.C ├── N3.CPP ├── N4.C ├── N4.CPP ├── N5.C ├── N5.cpp ├── N6.BAK ├── N6.C ├── N7.BAK ├── N7.C ├── N8.BAK ├── N8.C ├── NAME_TIM.BAK ├── NAME_TIM.CPP ├── NEST.BAK ├── NEST.C ├── NESTED.BAK ├── NESTED.C ├── NESTEDIF.BAK ├── NESTEDIF.C ├── NESTED_I.BAK ├── NESTED_I.CPP ├── NESTIF.BAK ├── NESTIF.CPP ├── NEST_CLS.BAK ├── NEST_CLS.CPP ├── NEW1.CPP ├── NEW2.CPP ├── NI1.CPP ├── NON.C ├── NONA1.C ├── NONAM.C ├── NONAME00.BAK ├── NONAME00.CPP ├── NONAME01.BAK ├── NONAME01.C ├── NONAME01.CPP ├── NONAME02.BAK ├── NONAME02.CPP ├── NONAME03.BAK ├── NONAME03.C ├── NONAME03.CPP ├── NONAME04.CPP ├── NONAME05.BAK ├── NONAME05.C ├── NONAME05.CPP ├── NONAME06.CPP ├── NONAME12.CPP ├── NUM.CPP ├── OBJXREF.COM ├── ODD.BAK ├── ODD.CPP ├── OPERATOR.BAK ├── OPERATOR.CPP ├── OP_2.BAK ├── OP_2.CPP ├── P.1CP ├── P.C ├── P1.BAK ├── P1.C ├── P1.CPP ├── P10.C ├── P2.BAK ├── P2.C ├── P2.CPP ├── P21.CPP ├── P22.CPP ├── P23.CPP ├── P24.CPP ├── P25.CPP ├── P3.BAK ├── P3.C ├── P3.CPP ├── P4.BAK ├── P4.C ├── P4.CPP ├── P5.BAK ├── P5.C ├── P5.CPP ├── P6.C ├── P7.C ├── P8.C ├── P9.BAK ├── P9.C ├── PA1.C ├── PA10.C ├── PA11.C ├── PA12.C ├── PA13.C ├── PA14.C ├── PA15.C ├── PA16.C ├── PA2.C ├── PA3.C ├── PA32.C ├── PA4.C ├── PA5.C ├── PA6.C ├── PA7.C ├── PA8.C ├── PA81.CPP ├── PA9.C ├── PALINDRO.BAK ├── PALINDRO.C ├── PARAM&VI.CPP ├── PATTERN.BAK ├── PATTERN.CPP ├── PC.CPP ├── PNTR.BAK ├── PNTR.CPP ├── POINTER1.BAK ├── POINTER1.C ├── POOJA.CPP ├── PP.BAK ├── PP.C ├── PP.CPP ├── PPP1.CPP ├── PR1.BAK ├── PR1.C ├── PR2.CPP ├── PRAVEEN.CPP ├── PRG1.BAK ├── PRG1.C ├── PRG1.CPP ├── PRG2.C ├── PRG2.CPP ├── PRG3.BAK ├── PRG3.C ├── PRG4.BAK ├── PRG4.C ├── PRG4.CPP ├── PRG5.BAK ├── PRG5.C ├── PRG5.CPP ├── PRG6.BAK ├── PRG6.CPP ├── PRG7.BAK ├── PRG7.C ├── PRG7.CPP ├── PRG8.BAK ├── PRG8.C ├── PRG9.BAK ├── PRG9.C ├── PRJ2MAK.EXE ├── PRJCFG.EXE ├── PRJCNVT.EXE ├── PRODUCT.BAK ├── PRODUCT.C ├── PROG1.BAK ├── PROG1.C ├── PROG1.CPP ├── PROG10.BAK ├── PROG10.C ├── PROG2.BAK ├── PROG2.C ├── PROG2.CPP ├── PROG3.BAK ├── PROG3.C ├── PROG4.BAK ├── PROG4.C ├── PROG4.CPP ├── PROG5.C ├── PROG6.C ├── PROG7.BAK ├── PROG7.C ├── PROG8.BAK ├── PROG8.C ├── PRO_MAT.BAK ├── PRO_MAT.CPP ├── PURE.BAK ├── PURE.CPP ├── PURE1.BAK ├── PURE1.CPP ├── QUAND.CPP ├── QUANDRAN.BAK ├── QUANDRAN.C ├── QW.C ├── QWER.C ├── R.BAK ├── R.C ├── R1.BAK ├── R1.C ├── R1.CPP ├── R10.BAK ├── R10.C ├── R10.CPP ├── R11.C ├── R12.BAK ├── R12.C ├── R13.C ├── R14.C ├── R15.C ├── R16.C ├── R17.C ├── R18.C ├── R2.BAK ├── R2.C ├── R2.CPP ├── R3.BAK ├── R3.C ├── R3.CPP ├── R4.BAK ├── R4.C ├── R4.CPP ├── R5.BAK ├── R5.C ├── R5.CPP ├── R6.BAK ├── R6.C ├── R6.CPP ├── R7.BAK ├── R7.C ├── R7.CPP ├── R8.BAK ├── R8.C ├── R8.CPP ├── R800.BAK ├── R800.CPP ├── R9.BAK ├── R9.C ├── R9.CPP ├── RACH1.C ├── RACH2.C ├── RACH3.C ├── RACH4.C ├── RACH5.C ├── RACHANA.C ├── RAJ.C ├── RAJ1.C ├── RAJ10.C ├── RAJ11.C ├── RAJ12.C ├── RAJ13.C ├── RAJ14.C ├── RAJ15.C ├── RAJ17.C ├── RAJ2.C ├── RAJ25.C ├── RAJ26.C ├── RAJ27.C ├── RAJ28.C ├── RAJ29.C ├── RAJ3.C ├── RAJ30.C ├── RAJ31.C ├── RAJ32.C ├── RAJ33.C ├── RAJ34.C ├── RAJ4.C ├── RAJ5.C ├── RAJ6.C ├── RAJ7.C ├── RAJ8.C ├── RAJ9.C ├── RAJU1.CPP ├── RAJU2.CPP ├── RAJU3.CPP ├── RAJU4.CPP ├── RAJU5.CPP ├── RASHMI.C ├── RCCP.CPP ├── README.md ├── REBECCA.C ├── RECT1.BAK ├── RECT1.C ├── RECT2.BAK ├── RECT2.C ├── RECT3.BAK ├── RECT3.C ├── RECT4.C ├── RECT5.BAK ├── RECT5.C ├── RECTANGL.BAK ├── RECTANGL.C ├── REFERANC.BAK ├── REFERANC.CPP ├── RESULT.BAK ├── RESULT.C ├── RESUME.CPP ├── REV.BAK ├── REV.C ├── REV1.BAK ├── REV1.C ├── REV2.BAK ├── REV2.C ├── RISHAB.BAK ├── RISHAB.C ├── RISHAB2.BAK ├── RISHAB2.C ├── RK.C ├── RK2.C ├── RK3.C ├── RK3.CPP ├── RM.C ├── RR3.C ├── RRR.CPP ├── S.C ├── S.CPP ├── S1.BAK ├── S1.C ├── S1.CPP ├── S10.C ├── S10.CPP ├── S11.BAK ├── S11.C ├── S11.CPP ├── S12.BAK ├── S12.C ├── S13.C ├── S14.C ├── S15.C ├── S16.C ├── S17.C ├── S18.C ├── S19.C ├── S2.BAK ├── S2.C ├── S2.CPP ├── S20.C ├── S21.C ├── S22.C ├── S23.C ├── S24.C ├── S25.C ├── S26.C ├── S27.C ├── S28.C ├── S29.C ├── S3.BAK ├── S3.C ├── S3.CPP ├── S30.C ├── S31.C ├── S32.C ├── S33.C ├── S34.C ├── S35.C ├── S36.C ├── S37.C ├── S38.C ├── S39.C ├── S4.BAK ├── S4.C ├── S4.CPP ├── S40.C ├── S41.C ├── S42.C ├── S43.C ├── S44.C ├── S45.C ├── S46.C ├── S47.C ├── S48.C ├── S49.C ├── S5.BAK ├── S5.C ├── S5.CPP ├── S50.C ├── S51.C ├── S52.C ├── S53.C ├── S54.C ├── S55.C ├── S56.C ├── S57.BAK ├── S57.C ├── S58.C ├── S59.C ├── S6.BAK ├── S6.C ├── S6.CPP ├── S60.C ├── S61.C ├── S62.C ├── S63.BAK ├── S63.C ├── S64.BAK ├── S64.C ├── S65.BAK ├── S65.C ├── S66.BAK ├── S66.C ├── S67.C ├── S68.C ├── S69.C ├── S7.BAK ├── S7.C ├── S7.CPP ├── S70.C ├── S71.C ├── S72.C ├── S73.C ├── S74.C ├── S75.BAK ├── S75.C ├── S76.C ├── S77.BAK ├── S77.C ├── S78.BAK ├── S78.C ├── S79.C ├── S8.BAK ├── S8.C ├── S8.CPP ├── S80.BAK ├── S80.C ├── S81.C ├── S82.BAK ├── S82.C ├── S83.BAK ├── S83.C ├── S84.BAK ├── S84.C ├── S85.BAK ├── S85.C ├── S86.BAK ├── S86.C ├── S87.BAK ├── S87.C ├── S88.C ├── S89.C ├── S9.C ├── S9.CPP ├── S90.C ├── S91.C ├── S92.C ├── S93.C ├── S94.C ├── S95.C ├── S96.C ├── S96STURC.C ├── S97.BAK ├── S97.C ├── S98.C ├── S99.BAK ├── S99.C ├── SAMPLE.CPP ├── SANA.CPP ├── SANGEETA.CPP ├── SCS.CPP ├── SEARCH.BAK ├── SEARCH.C ├── SHAHEEN.CPP ├── SHH.BAK ├── SHH.C ├── SHHHHH.C ├── SHR.C ├── SI.BAK ├── SI.C ├── SI.CPP ├── SI1.BAK ├── SI1.CPP ├── SIF.BAK ├── SIF.C ├── SIF.CPP ├── SIF1.C ├── SIF2.BAK ├── SIF2.C ├── SIF3.C ├── SIF4.BAK ├── SIF4.C ├── SIF9.BAK ├── SIF9.C ├── SIFUN.BAK ├── SIFUN.C ├── SIF_EXP.BAK ├── SIF_EXP.C ├── SIMIF4.BAK ├── SIMIF4.C ├── SIMPIN.C ├── SIMPLE1.BAK ├── SIMPLE1.C ├── SIMPLEIF.C ├── SIMPLE_I.BAK ├── SIMPLE_I.C ├── SIMPLE_I.CPP ├── SIMPL_IN.C ├── SIMP_IF2.BAK ├── SIMP_IF2.C ├── SIM_IF.C ├── SIM_IF3.BAK ├── SIM_IF3.CPP ├── SIM_IF_2.BAK ├── SIM_IF_2.CPP ├── SINFUN.C ├── SINGLE.BAK ├── SINGLE.CPP ├── SINGLED.CPP ├── SIN_EMP.BAK ├── SIN_EMP.CPP ├── SIZEOF.BAK ├── SIZEOF.C ├── SIZEOF.CPP ├── SMALL.BAK ├── SMALL.CPP ├── SMALL3.C ├── SMALLEST.BAK ├── SMALLEST.C ├── SMFUN.BAK ├── SMFUN.CPP ├── SN1.C ├── SN10.C ├── SN11.C ├── SN12.C ├── SN13.C ├── SN2.C ├── SN3.C ├── SN4.C ├── SN5.C ├── SN6.C ├── SN7.C ├── SN8.C ├── SN9.C ├── SNEHAAAA.CPP ├── SONUSSB.CPP ├── SQ.BAK ├── SQ.C ├── SQCUBE.CPP ├── SQUARE.C ├── SRUSHTI.CPP ├── SS.1 ├── SS.2 ├── SS.3 ├── SS.BAK ├── SS.C ├── SS2.BAK ├── SS2.C ├── SS21.CPP ├── SS3.BAK ├── SS3.C ├── SS4.C ├── SS5.C ├── SS6.C ├── SS8.CPP ├── SSB.CPP ├── SSS.CPP ├── SSS78.CPP ├── STAR.C ├── STARNO.CPP ├── STN.CPP ├── STR.BAK ├── STR.C ├── STR1.BAK ├── STR1.C ├── STR1.CPP ├── STR2.BAK ├── STR2.C ├── STR2.CPP ├── STR3.BAK ├── STR3.C ├── STR3.CPP ├── STR4.CPP ├── STR5.CPP ├── STR6.CPP ├── STR7.CPP ├── STR8.CPP ├── STR9.CPP ├── STRING1.BAK ├── STRING1.C ├── STRING1.CPP ├── STRING2.BAK ├── STRING2.C ├── STRING3.BAK ├── STRING3.C ├── STRING4.BAK ├── STRING4.C ├── STRING5.BAK ├── STRING5.C ├── STRING6.BAK ├── STRING6.C ├── STRING7.BAK ├── STRING7.C ├── STRING8.BAK ├── STRING8.C ├── STRINGH.CPP ├── STRLEN.CPP ├── STRUC1.BAK ├── STRUC1.C ├── STRUC2.BAK ├── STRUC2.C ├── STRUC3.BAK ├── STRUC3.C ├── STRUC4.BAK ├── STRUC4.C ├── STRUC5.BAK ├── STRUC5.C ├── STRUC6.C ├── STRUCT1.BAK ├── STRUCT1.C ├── STRUCT2.BAK ├── STRUCT2.C ├── STRUCT21.C ├── STRUCT3.BAK ├── STRUCT3.C ├── STRUCT4.BAK ├── STRUCT4.C ├── STRUCT5.BAK ├── STRUCT5.C ├── STRUCT6.BAK ├── STRUCT6.C ├── STRUCTAR.BAK ├── STRUCTAR.C ├── STRUCTAR.CPP ├── STRUCTEX.BAK ├── STRUCTEX.C ├── STRUCTN1.C ├── STRUCTUR.BAK ├── STRUCTUR.C ├── STRUCT_A.BAK ├── STRUCT_A.C ├── STRUCT_E.BAK ├── STRUCT_E.C ├── STRUCT~1.BAK ├── STRUCT~1.C ├── STRUCT~2.BAK ├── STR_ARR.BAK ├── STR_ARR.C ├── STR_EQUA.BAK ├── STR_EQUA.C ├── STUD.BAK ├── STUD.C ├── STUD1.C ├── STUDENT.BAK ├── STUDENT.CPP ├── STUDINFO.BAK ├── STUDINFO.C ├── SUDHA00.CPP ├── SUM.BAK ├── SUM.C ├── SUM.CPP ├── SUMAR.C ├── SUMARRAY.C ├── SUMAVG.C ├── SUMAVG.CPP ├── SUMEVEN.BAK ├── SUMEVEN.C ├── SV44.CPP ├── SV45.CPP ├── SV46.CPP ├── SV47.CPP ├── SV50.CPP ├── SV51.CPP ├── SV52.CPP ├── SVA.CPP ├── SW.BAK ├── SW.C ├── SW1.CPP ├── SW2.BAK ├── SW2.CPP ├── SWA.CPP ├── SWA1.CPP ├── SWAP.BAK ├── SWAP.C ├── SWAP.CPP ├── SWAP1.BAK ├── SWAP1.C ├── SWAP2.BAK ├── SWAP2.CPP ├── SWAPFUNC.BAK ├── SWAPFUNC.C ├── SWAPPRG.BAK ├── SWAPPRG.CPP ├── SWAPV.CPP ├── SWITCH.BAK ├── SWITCH.C ├── SWITCH.CPP ├── SWITCH1.BAK ├── SWITCH1.C ├── SWITCHGR.BAK ├── SWITCHGR.C ├── SWP.C ├── SWT.BAK ├── SWT.CPP ├── SWT1.BAK ├── SWT1.C ├── S_INHERI.BAK ├── S_INHERI.CPP ├── T1.BAK ├── T1.C ├── T1.CPP ├── T10.C ├── T13.C ├── T2.BAK ├── T2.C ├── T2.CPP ├── T3.BAK ├── T3.C ├── T4.BAK ├── T4.C ├── T5.C ├── T6.BAK ├── T6.C ├── T7.BAK ├── T7.C ├── T8.C ├── TABLE.C ├── TEMPLA~1.BAK ├── TEMPLA~1.CPP ├── TEST.BAK ├── TEST.C ├── TEST1.C ├── TEST2.BAK ├── TEST2.C ├── THELP.CFG ├── THELP.COM ├── TICKET.C ├── TIME.BAK ├── TIME.CPP ├── TLIB.EXE ├── TLINK.EXE ├── TMPL2.BAK ├── TMPL2.CPP ├── TOUCH.COM ├── TRANCOPY.EXE ├── TRI.BAK ├── TRI.C ├── TRI.CPP ├── TRIFUN.BAK ├── TRIFUN.CPP ├── TRIGRAPH.EXE ├── TURBOC.CFG ├── TWO.C ├── TYPE_CAS.BAK ├── TYPE_CAS.CPP ├── TYP_CAST.BAK ├── TYP_CAST.CPP ├── UF1.BAK ├── UF1.C ├── UF2.BAK ├── UF2.C ├── UF3.BAK ├── UF3.C ├── UF4.C ├── UMA.CPP ├── UNION.BAK ├── UNION.C ├── UNZIP.EXE ├── USERDEFF.BAK ├── USERDEFF.C ├── UU.C ├── V1.CPP ├── V11.CPP ├── V12.CPP ├── V13.CPP ├── V14.CPP ├── V15.CPP ├── V16.CPP ├── V17.CPP ├── V19.CPP ├── V2.CPP ├── V20.CPP ├── V29.CPP ├── V3.CPP ├── VANI16.CPP ├── VANI17.CPP ├── VANI18.CPP ├── VANI19.CPP ├── VANI20.CPP ├── VANI21.CPP ├── VANI22.CPP ├── VANI23.CPP ├── VANI6.CPP ├── VANI7.CPP ├── VANI8.CPP ├── VANI9.CPP ├── VH.C ├── VIDYA.CPP ├── VIJAY1.CPP ├── VIJAY10.CPP ├── VIJAY11.CPP ├── VIJAY12.CPP ├── VIJAY13.CPP ├── VIJAY14.CPP ├── VIJAY2.CPP ├── VIJAY20.CPP ├── VIJAY21.CPP ├── VIJAY23.CPP ├── VIJAY3.CPP ├── VIJAY4.CPP ├── VIJAY6.CPP ├── VIJAY7.CPP ├── VIJAY8.CPP ├── VIJAY9.CPP ├── VIRT-CLS.CPP ├── VIRTUAL_.BAK ├── VIRTUAL_.CPP ├── VIRT_CLS.BAK ├── VIRT_CLS.CPP ├── VISHWA.C ├── VOTING.C ├── VOWEL.BAK ├── VOWEL.C ├── VOWEL.CPP ├── VS1.CPP ├── VS10.CPP ├── VS11.CPP ├── VS12.CPP ├── VS13.CPP ├── VS14.CPP ├── VS15.CPP ├── VS16.CPP ├── VS17.CPP ├── VS18.CPP ├── VS19.CPP ├── VS2.CPP ├── VS20.CPP ├── VS21.CPP ├── VS22.CPP ├── VS23.CPP ├── VS24.CPP ├── VS25.CPP ├── VS26.CPP ├── VS3.CPP ├── VS4.CPP ├── VS43.CPP ├── VS5.CPP ├── VS6.CPP ├── VS7.CPP ├── VS8.CPP ├── VS9.CPP ├── c programs ├── c++ new.docx ├── c_final.docx ├── c_prog.docx ├── ch01.ppt ├── ch4_additional.ppt ├── ch5_additional.ppt ├── ch6_additional.ppt ├── ch7_additional.ppt ├── ch9_additional.ppt ├── clockp.cpp ├── clockp1.cpp ├── clockp2.cpp ├── clockp4.cpp ├── clockp5.cpp ├── lecture02-cpp.ppt ├── p.cpp.txt └── p.txt /27_C.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/27_C.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch02.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch02.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch03.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch03.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch04.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch04.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch05.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch05.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch06.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch06.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch07.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch07.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch08.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch08.ppt -------------------------------------------------------------------------------- /9781423902096_PPT_ch09.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/9781423902096_PPT_ch09.ppt -------------------------------------------------------------------------------- /Basics of C.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/Basics of C.ppt -------------------------------------------------------------------------------- /C++_programs.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/C++_programs.ppt -------------------------------------------------------------------------------- /Chap-02-1.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/Chap-02-1.ppt -------------------------------------------------------------------------------- /Introduction-to-C-Part-1.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/Introduction-to-C-Part-1.pptx -------------------------------------------------------------------------------- /Introduction-to-C-Program.9249163.powerpoint.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/Introduction-to-C-Program.9249163.powerpoint.pptx -------------------------------------------------------------------------------- /Learn-C-Programming-Lan.7570924.powerpoint.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/Learn-C-Programming-Lan.7570924.powerpoint.pptx -------------------------------------------------------------------------------- /M45.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/M45.C -------------------------------------------------------------------------------- /M56.BAK: -------------------------------------------------------------------------------- 1 | //program to read a string and print the same 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str[20]; 8 | clrscr(); 9 | cout<<"\n Enter any string"; 10 | gets(str); 11 | //cin>>str; 12 | cout<<"\n Entered string is "< 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str[20]; 8 | clrscr(); 9 | cout<<"\n Enter any string"; 10 | gets(str); 11 | //cin>>str; 12 | cout<<"\n Entered string is "< 3 | #include 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str[20]; 9 | clrscr(); 10 | cout<<"\n Enter any string"; 11 | gets(str); 12 | cout<<"\n Entered string is "< 3 | #include 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str[20]; 9 | clrscr(); 10 | cout<<"\n Enter any string"; 11 | gets(str); 12 | cout<<"\n Entered string is "< 3 | #include 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str[20]; 9 | clrscr(); 10 | cout<<"\n Enter any string"; 11 | gets(str); 12 | cout<<"\n Entered string is "< 3 | #include 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str1[20]; 9 | clrscr(); 10 | cout<<"\n Enter any string"; 11 | gets(str1); 12 | cout<<"\n Given string is "< 3 | #include 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str1[20]; 9 | clrscr(); 10 | cout<<"\n Enter any string"; 11 | gets(str1); 12 | cout<<"\n Given string is "< 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | //scanf("%s",str); 10 | gets(str); 11 | printf("\n Entered string is %s",str); 12 | getch(); 13 | 14 | } -------------------------------------------------------------------------------- /M71.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | //scanf("%s",str); 10 | gets(str); 11 | printf("\n Entered string is %s",str); 12 | getch(); 13 | 14 | } -------------------------------------------------------------------------------- /M78.BAK: -------------------------------------------------------------------------------- 1 | /*prg to read to reverse a given string 2 | using built in function*/ 3 | #include 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str1[20]; 9 | clrscr(); 10 | printf("\n Enter any string"); 11 | gets(str1); 12 | strrev(str1); 13 | printf("\n Reversed string is %s",str1); 14 | 15 | getch(); 16 | 17 | } -------------------------------------------------------------------------------- /MADHU7.C: -------------------------------------------------------------------------------- 1 | //illustrate string 2 | #include 3 | #include 4 | void main() 5 | { 6 | char name[10]; 7 | clrscr(); 8 | printf("enter name"); 9 | scanf("%s",name); 10 | printf("\n name=%s",name); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /MADHU8.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | void main() 5 | { 6 | char address[40]; 7 | clrscr(); 8 | printf("\nillustration of gets\n"); 9 | gets(address); 10 | printf("\naddress\n); 11 | puts(address); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /MADHU9.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int i,n; 6 | clrscr(); 7 | printf("enter final value\n"); 8 | scan -------------------------------------------------------------------------------- /MAKE.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/MAKE.EXE -------------------------------------------------------------------------------- /MAKER.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/MAKER.EXE -------------------------------------------------------------------------------- /MANJU.CPP: -------------------------------------------------------------------------------- 1 | /*prg to perform basic arithmetic operation*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,sum,sub,prd,div; 7 | clrscr(); 8 | printf("\n enter two nos"); 9 | scanf("%d%d",&a,&b); 10 | sum=a+b; 11 | sub=a-b; 12 | prd=a*b; 13 | div=a%b; 14 | printf("\n sum=%d",sum); 15 | printf("\n sub=%d",sub); 16 | printf("\n prd=%d",prd); 17 | printf("\n div=%d",div); 18 | getch(); 19 | } -------------------------------------------------------------------------------- /MARCH1.BAK: -------------------------------------------------------------------------------- 1 | //program to find sum of two numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | printf("\n\tenter two integers"); 11 | scanf("%d%d",&a,&b); 12 | sum=a+b; 13 | printf("\n\ta=%d\n\tb=%d\n\tsum=%d",a,b,sum) 14 | getch(); 15 | } -------------------------------------------------------------------------------- /MARCH1.C: -------------------------------------------------------------------------------- 1 | //program to find sum of two numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | printf("\n\tenter two integers"); 11 | scanf("%d%d",&a,&b); 12 | sum=a+b; 13 | printf("\n\ta=%d\n\tb=%d\n\tsum=%d",a,b,sum); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /MEGHA123.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/MEGHA123.CPP -------------------------------------------------------------------------------- /MEGHA555.CPP: -------------------------------------------------------------------------------- 1 | //program to find the lenth of string using pointers 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | char str[10],*ptr; 8 | int i=0; 9 | clrscr(); 10 | printf("enter the string:"); 11 | scanf("%s",&str); 12 | ptr=str; 13 | while(*ptr++!='\0') 14 | { 15 | i++; 16 | } 17 | printf("lenth of string=%d",i); 18 | getch(); 19 | } -------------------------------------------------------------------------------- /MK.C: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n Welcome to C programming"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /MM1.BAK: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n Welcome to C programming"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /MM1.C: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n Welcome to C programming"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /MM10.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a traingle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,b,h; 7 | clrscr(); 8 | printf("\n Enter base and height"); 9 | scanf("%f%f",&b,&h); 10 | area=0.5*b*h; 11 | printf("\n Area of a traingle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /MM11.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a rectangle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,b,l; 7 | clrscr(); 8 | printf("\n Enter length and breadth"); 9 | scanf("%f%f",&l,&b); 10 | area=l*b; 11 | printf("\n Area of a rectangle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /MM12.BAK: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,pi=3.142,r; 7 | clrscr(); 8 | printf("\n Enter radius"); 9 | scanf("%f",&r); 10 | area=pi*r*r; 11 | printf("\n Area of a circle=%2f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /MM12.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,pi=3.142,r; 7 | clrscr(); 8 | printf("\n Enter radius"); 9 | scanf("%f",&r); 10 | area=pi*r*r; 11 | printf("\n Area of a circle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /MM13.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | #define pi 3.142 5 | void main() 6 | { 7 | float area,r; 8 | clrscr(); 9 | printf("\n Enter radius"); 10 | scanf("%f",&r); 11 | area=pi*r*r; 12 | printf("\n Area of a circle=%f",area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /MM14.BAK: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | float pi=3.142; 5 | void main() 6 | { 7 | float area,r; 8 | clrscr(); 9 | printf("\n Enter radius"); 10 | scanf("%f",&r); 11 | area=pi*r*r; 12 | printf("\n Area of a circle=%f",area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /MM14.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | float pi=3.142;//global variable 5 | void main() 6 | { 7 | float area,r; 8 | clrscr(); 9 | printf("\n Enter radius"); 10 | scanf("%f",&r); 11 | area=pi*r*r; 12 | printf("\n Area of a circle=%f",area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /MM2.C: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n All"); 8 | printf("\n The"); 9 | printf("\n Best"); 10 | getch(); 11 | } 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /MM3.C: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n All \n The \n Best"); 8 | getch(); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /MM4.BAK: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n All \n The \n Best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /MM4.C: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n All \t The \t Best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /MM5.BAK: -------------------------------------------------------------------------------- 1 | /*prg to print a simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n All \a The \a Best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /MM5.C: -------------------------------------------------------------------------------- 1 | /*prg to find sum of 2 nums*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,sum; 7 | clrscr(); 8 | printf("\n Enter two numbers"); 9 | scanf("%d%d",&a,&b); 10 | sum=a+b; 11 | printf("\n sum of two numbers=%d",sum); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /MM8.C: -------------------------------------------------------------------------------- 1 | /*prg to swap two nums using dummy variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,temp; 7 | clrscr(); 8 | printf("\n Enter two numbers"); 9 | scanf("%d%d",&a,&b); 10 | temp=a; 11 | a=b; 12 | b=temp; 13 | printf("\n After swapping a=%d \t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /MM9.C: -------------------------------------------------------------------------------- 1 | /*prg to swap two nums without using dummy variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b; 7 | clrscr(); 8 | printf("\n Enter two numbers"); 9 | scanf("%d%d",&a,&b); 10 | a=a+b; 11 | b=a-b; 12 | a=a-b; 13 | printf("\n After swapping a=%d \t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /MYFILE1.BAK: -------------------------------------------------------------------------------- 1 | //to display a line of text 2 | 3 | #include 4 | #include 5 | void main() 6 | { 7 | clrscr(); 8 | printf("\n\tWELCOME TO C PROGRAMMING"); 9 | printf("\n\tNAME:KEONICS\n\tADDRESS:IT PARK\n\t\tHUBLI"); 10 | getch(); 11 | } 12 | -------------------------------------------------------------------------------- /MYFILE1.C: -------------------------------------------------------------------------------- 1 | //program to add 2 numbers 2 | 3 | #include 4 | #include 5 | void main() 6 | { 7 | int a,b,sum; 8 | clrscr(); 9 | a=10; 10 | b=30; 11 | sum=a+b; 12 | printf("\n\ta=%d\n\tb=%d\n\tsum=%d",a,b,sum); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /N.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int m; 6 | clrscr(); 7 | cout<<"Enter any number"; 8 | cin>>m; 9 | 10 | if(m%7==0) 11 | cout< 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | //scanf("%s",str); 10 | gets(str); 11 | printf("\n Entered string is %s",str); 12 | getch(); 13 | 14 | } -------------------------------------------------------------------------------- /N2.CPP: -------------------------------------------------------------------------------- 1 | //prg to print sum of two no's. 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a=5, b=10, sum; 7 | sum=a+b; 8 | printf("\n sum:=%d",sum); 9 | getch(); 10 | } -------------------------------------------------------------------------------- /N25.CPP: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /N3.BAK: -------------------------------------------------------------------------------- 1 | /*prg to print shapes*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n ******"); 8 | printf("\n * *"); 9 | printf("\n * *"); 10 | printf("\n * *"); 11 | printf("\n *******"); 12 | getch(); 13 | 14 | } 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /N3.CPP: -------------------------------------------------------------------------------- 1 | /*prg to print shapes.*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n *"); 8 | printf("\n ***"); 9 | printf("\n *****"); 10 | printf("\n *******"); 11 | getch(); 12 | 13 | } 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /N5.cpp: -------------------------------------------------------------------------------- 1 | /*prg to print logical operations..*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | int a=5,b=10,max; 8 | if(a>b) 9 | printf("\n a is Maximum of number:=%d",a); 10 | if(a 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf("\n Enter any string"); 10 | gets(str1); 11 | strupr(str1); 12 | printf("\n Uppercase string is %s",str1); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /N6.C: -------------------------------------------------------------------------------- 1 | /*prg to convert upper case string to lowercase string functions*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf("\n Enter any string"); 10 | gets(str1); 11 | strlwr(str1); 12 | printf("\n Uppercase string is %s",str1); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /N7.BAK: -------------------------------------------------------------------------------- 1 | /*prg to convert upper case string to lowercase string functions*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf("\n Enter any string"); 10 | gets(str1); 11 | strlwr(str1); 12 | printf("\n Uppercase string is %s",str1); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /N7.C: -------------------------------------------------------------------------------- 1 | /*prg to convert upper case string to lowercase string functions*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf("\n Enter any string"); 10 | gets(str1); 11 | strlwr(str1); 12 | printf("\n Lower case string is %s",str1); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /NEST.C: -------------------------------------------------------------------------------- 1 | //program to illustrate nested if 2 | #include 3 | #include 4 | void main() 5 | { 6 | int num; 7 | clrscr(); 8 | printf("\nenter any number"); 9 | scanf("%d",&num); 10 | if(num%3==0) 11 | { 12 | if(num%7==0) 13 | { 14 | printf("%d is divisable by both 3 and 7",num); 15 | } 16 | 17 | } 18 | 19 | getch(); 20 | } 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /NESTED_I.BAK: -------------------------------------------------------------------------------- 1 | //illustrate nested if 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int n; 8 | clrscr(); 9 | cout<<"\nenter any number"; 10 | cin>>n; 11 | if(n%5==0) 12 | { 13 | if(n%7==0) 14 | { 15 | cout<<"ENTERED NUMBER IS DIVISABLE BY 5 AND 7"; 16 | } 17 | } 18 | getch(); 19 | } -------------------------------------------------------------------------------- /NESTED_I.CPP: -------------------------------------------------------------------------------- 1 | //illustrate nested if 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int n; 8 | clrscr(); 9 | cout<<"\nenter any number"; 10 | cin>>n; 11 | if(n%5==0) 12 | { 13 | if(n%7==0) 14 | { 15 | cout<<"ENTERED NUMBER IS DIVISABLE BY 5 AND 7"; 16 | } 17 | } 18 | getch(); 19 | } -------------------------------------------------------------------------------- /NEW1.CPP: -------------------------------------------------------------------------------- 1 | //program to find area of triangle 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float b,h,area; 9 | clrscr(); 10 | cout<<"\n\tenter base and height"; 11 | cin>>b>>h; 12 | area=0.5*b*h; 13 | cout<<"\n\tbase="< 2 | #include 3 | 4 | void main() 5 | { 6 | float area,l,b; 7 | clrscr(); 8 | cout<<"\n\tenter values for l and b"; 9 | cin>>l>>b; 10 | area=l*b; 11 | cout<<"\n\tl="< 2 | #include 3 | void main() 4 | { 5 | int a,b,c,mul; 6 | clrscr(); 7 | printf("\n\tenter the value a,b,c"); 8 | scanf("%d%d%d",&a,&b,&c); 9 | mul=a*b*c; 10 | printf("mul=%d",mul); 11 | getch(); 12 | } 13 | -------------------------------------------------------------------------------- /NONA1.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b,sum; 6 | float avrg; 7 | clrscr(); 8 | printf("\n\tenter the value of a,b"); 9 | scanf("%d%d",&a,&b); 10 | sum=a+b; 11 | avrg=sum/2; 12 | printf("\n\tsum=%d\navrg=%f",sum,avrg); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /NONAM.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float area,b,h; 6 | clrscr(); 7 | printf("\n\tenter the value of a,b"); 8 | scanf("%f%f",&b,&h); 9 | area=b*h; 10 | printf("\n\tarea=%f",area); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /NONAME00.BAK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/NONAME00.BAK -------------------------------------------------------------------------------- /NONAME00.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/NONAME00.CPP -------------------------------------------------------------------------------- /NONAME01.BAK: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /NONAME01.C: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | int a,b,sum; 5 | void addition(); 6 | 7 | void main() 8 | { 9 | clrscr(); 10 | addition(); 11 | getch(); 12 | } 13 | void addition() 14 | { 15 | printf("\n\tenter 2 integers"); 16 | scanf("%d%d",&a,&b); 17 | sum=a+b; 18 | printf("\n\tsum=%d",sum); 19 | } -------------------------------------------------------------------------------- /NONAME01.CPP: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate strings*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | // scanf("%s",str); 10 | gets(str); 11 | printf("\n Entered string is %s",str); 12 | getch(); 13 | } 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NONAME02.BAK: -------------------------------------------------------------------------------- 1 | //program to find squre -------------------------------------------------------------------------------- /NONAME02.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/NONAME02.CPP -------------------------------------------------------------------------------- /NONAME03.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int age; 7 | clrscr(); 8 | printf("Enter your age to know whether you are eligible for voting or not."); 9 | scanf("%d",&age); 10 | Eligible=(age>18?eligible: -------------------------------------------------------------------------------- /NONAME04.CPP: -------------------------------------------------------------------------------- 1 | 2 | int i,n,sum=0; 3 | clrscr(); 4 | cout<<"\n\tenter final value"; 5 | cin>>n; 6 | i=1; 7 | do 8 | { 9 | cout<<"\n\t"< 3 | #include 4 | void amin() 5 | { 6 | float ar,l,b; 7 | clrscr(); 8 | cout<<"enter length and breadth"; 9 | cin>>l>>b; 10 | ar=l*b; 11 | cout<<"\n area of a rectangle ="< 2 | #include 3 | 4 | void main() 5 | { 6 | int i,n; 7 | clrscr(); 8 | i=51; 9 | n=100; 10 | cout<<"\n\todd numbers from 50 to 100"; 11 | while(i<=n) 12 | { 13 | cout<<"\t"< 2 | #include 3 | 4 | void main() 5 | { 6 | int i,n; 7 | clrscr(); 8 | i=51; 9 | n=100; 10 | cout<<"\n\todd numbers from 50 to 100"< 2 | #includk 3 | { 4 | int i=1; 5 | do{ 6 | cout< 3 | #include 4 | void main() 5 | { 6 | int year; 7 | clrscr(); 8 | printf("\n Enter any year"); 9 | scanf("%d",&year); 10 | (year%4==0)?printf("\n %d is leap year"):printf("\n %d is not a leap year",year); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /P1.BAK: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate strings*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | // scanf("%s",str); 10 | gets(str); 11 | // printf("\n Entered string is %s",str); 12 | puts(str); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /P1.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate strings*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | // scanf("%s",str); 10 | gets(str); 11 | printf("\n Entered string is %s",str); 12 | 13 | getch(); 14 | } -------------------------------------------------------------------------------- /P1.CPP: -------------------------------------------------------------------------------- 1 | //program to dispaly line of text 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | clrscr(); 9 | cout<<"\n\n\tWELCOME TO OOP WITH C++"; 10 | cout<<"\n\tdeveloped by BJARNE STROUSTROP"< 4 | #include 5 | 6 | void main() 7 | { 8 | float a,b,c,sum,avg; 9 | clrscr(); 10 | cout<<"\nenter 3 numbers"; 11 | cin>>a>>b>>c; 12 | sum=a+b+c; 13 | avg=sum/3; 14 | cout<<"\n\ta="< 3 | #include 4 | int main() 5 | { 6 | int i=1; 7 | clrscr(); 8 | while(i<=100) 9 | { 10 | if(i%5==0 && i%7==0) 11 | { 12 | cout< 3 | #include 4 | int main() 5 | { 6 | int i=1,f1=-1,f2=1,f3; 7 | clrscr(); 8 | while(i<=10) 9 | { 10 | f3=f1+f2; 11 | cout< 3 | #include 4 | int main() 5 | { 6 | int i=1,sum=0,n; 7 | clrscr(); 8 | cout<<"\n Enter any number"; 9 | cin>>n; 10 | while(i<=n) 11 | { 12 | sum=sum+i; 13 | i++; 14 | } 15 | cout<<"sum of 1 to n nums="< 3 | #include 4 | int main() 5 | { 6 | int i=1,fact=1,n; 7 | clrscr(); 8 | cout<<"\n Enter any number"; 9 | cin>>n; 10 | while(i<=n) 11 | { 12 | fact=fact*i; 13 | i++; 14 | } 15 | cout<<"Factorial of a given ="< 3 | #include 4 | 5 | void main() 6 | { 7 | float r,area,cir; 8 | clrscr(); 9 | r=4.6; 10 | area=3.142*r*r; 11 | cir=2*3.142*r; 12 | printf("\n\tr=%f\n\tarea of circle=%f\n\tcircumference=%f",r,area,cir); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /P3.CPP: -------------------------------------------------------------------------------- 1 | //area of circle 2 | 3 | #include 4 | #include 5 | #define pi 3.142 6 | 7 | void main() 8 | { 9 | float r,area; 10 | clrscr(); 11 | cout<<"\n\tenter radious of the circle"; 12 | cin>>r; 13 | area=pi*r*r; 14 | cout<<"\n\tradious="< 3 | int main() 4 | { 5 | int i,a[5],sum=0; 6 | clrscr(); 7 | printf("Enter 6 numbers:\n"); 8 | for(i=0;i<5;++i) 9 | { 10 | scanf("%d",(a+i)); // (a+i) is equivalent to &a[i] 11 | sum += *(a+i); // *(a+i) is equivalent to a[i] 12 | } 13 | printf("Sum=%d",sum); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /P4.CPP: -------------------------------------------------------------------------------- 1 | //find square and cube of a given number 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int n,s,c; 9 | clrscr(); 10 | cout<<"\n\tenter any integer"; 11 | cin>>n; 12 | s=n*n; 13 | c=n*n*n; 14 | cout<<"\n\tnumber="< 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf("\n Enter any string"); 10 | gets(str1); 11 | printf("\n Entered string is %s",str1); 12 | printf("\n Reversed string is %s",strrev(str1)); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /P8.C: -------------------------------------------------------------------------------- 1 | /*prg to convert uppercase to lower case a given string*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf("\n Enter any string"); 10 | gets(str1); 11 | printf("\n Entered string is %s",str1); 12 | printf("\n Lower case string is %s",strlwr(str1)); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /PA10.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area ,r; 7 | clrscr(); 8 | printf("\n enter radius"); 9 | scanf("%f",&r); 10 | area=pi*r*r; 11 | printf("\n area of a circle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /PA11.C: -------------------------------------------------------------------------------- 1 | \*prg to find area of acircle when 3sides are given*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area a,b,c,s; 7 | clrscr(); 8 | printf("\n enter 3 sides"); 9 | scanf("%f%f%f",&a,&a,&c); 10 | s=(a+b+c)/2; 11 | area=sqrt(*(s-a)*(s-b)*(s-c)); 12 | printf("\n areaofa circle=%f",area); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /PA12.C: -------------------------------------------------------------------------------- 1 | \*prg to find squ are root of agiven no*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | float n,sq; 8 | clrscr(); 9 | printf("\n enter any no"); 10 | scanf("%f",&n); 11 | sq=sqrt(n) 12 | printf("\n squ are root of a given no=%f",sq); 13 | area=sqrt(s*(s-a)*(s-b)*(s-c)); 14 | printf("\n area of a circle=%f",area); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /PA13.C: -------------------------------------------------------------------------------- 1 | \*prg to find area of acircle when 3sides are given*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | float area ,a,b,c,s; 8 | clrscr(); 9 | printf("\n enter 3 sides"); 10 | scanf("%f%f%f",&a,&a,&c); 11 | s=(a+b+c)/2; 12 | area=sqrt(s*(s-a)*(s-b)*(s-c)); 13 | printf("\n Area of a circle=%f",area); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /PA14.C: -------------------------------------------------------------------------------- 1 | \*prg to find Area of a circle when 3 sides are given*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area a,b,c,s; 7 | clrscr(); 8 | printf("\n enter 3 sides"); 9 | scanf("%f%f%f",&a,&a,&c); 10 | s=(a+b+c)/2; 11 | area=sqrt(*(s-a)*(s-b)*(s-c)); 12 | printf("\n Area of a circle=%f",area); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /PA15.C: -------------------------------------------------------------------------------- 1 | /*prg to find squ are root of a given no*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | float,n,sq; 8 | clrscr(); 9 | printf('\n enter any no"); 10 | scanf("%f",&n); 11 | sq=sqrt(n); 12 | printf("\n squ are root of a given no=%f",sq); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /PA16.C: -------------------------------------------------------------------------------- 1 | /*prg to find sum and avg of 3 nums*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float a,b,c,sum,avg; 7 | clrscr(); 8 | printf("\n enter 3 nos"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | sum=a+b+c; 11 | avg=(sum%3); 12 | printf("\n sum=%f",sum); 13 | printf("\n averege=%f",avg); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PA3.C: -------------------------------------------------------------------------------- 1 | //prg to find sum of 2nums 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n enter 2 nums "); 8 | scanf("%d%d",&a,&b); 9 | sum=a+b; 10 | printf("\n sum of 2nums=%d", sum); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /PA4.C: -------------------------------------------------------------------------------- 1 | //prg to swap 2nums using dummy vrible*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,temt; 7 | clrscr(); 8 | printf("\n enter 2 nums "); 9 | scanf("%d%d",&a,&b); 10 | temp=a; 11 | a=b; 12 | b=temp; 13 | printf("\n alter swapping a=%d\t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PA8.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a traingle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area ,b,h; 7 | clrscr(); 8 | printf("\n enter base and hight"); 9 | scanf("%f%f"&b,&h); 10 | area=0.5*b*h; 11 | printf("\n area ofa traingle=%f"area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /PA81.CPP: -------------------------------------------------------------------------------- 1 | //program to find the sum and avereg of three number 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,c; 7 | float sum,avg; 8 | clrscr(); 9 | printf("enter three number:"); 10 | scanf("%d%d%d",&a,&b,&c); 11 | sum=a+b+c; 12 | avg=sum/3; 13 | printf("sum=%f",sum); 14 | printf("\navg=%f",avg); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /PA9.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a rectngle 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area ,b,l; 7 | clrscr(); 8 | printf("\n enter width and breadth"); 9 | scanf("%f%f",&l,&b); 10 | area=l*b; 11 | printf("\n area ofa rectngle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /PATTERN.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int rows; 7 | clrscr(); 8 | cout<<"Enter number of rows: "; 9 | cin>>rows; 10 | 11 | for(int i=1;i<=rows;++i) 12 | { 13 | for(int j=1;j<=i;++j) 14 | { 15 | cout<<"* "; 16 | } 17 | cout<<"\n"; 18 | } 19 | getch(); 20 | } 21 | -------------------------------------------------------------------------------- /PATTERN.CPP: -------------------------------------------------------------------------------- 1 | //pattern printing 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int rows; 8 | clrscr(); 9 | cout<<"Enter number of rows: "; 10 | cin>>rows; 11 | 12 | for(int i=1;i<=rows;++i) 13 | { 14 | for(int j=1;j<=i;++j) 15 | { 16 | cout<<"* "; 17 | } 18 | cout<<"\n"; 19 | } 20 | getch(); 21 | } 22 | -------------------------------------------------------------------------------- /POOJA.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/POOJA.CPP -------------------------------------------------------------------------------- /PP.BAK: -------------------------------------------------------------------------------- 1 | //prg to find the biggest of two numbers using sub program 2 | #include 3 | #include 4 | int x=5; 5 | int big(int); 6 | void main() 7 | 8 | { 9 | int a,b,lar; //local variable 10 | clrscr(); 11 | printf("\n x=%d",x); 12 | lar=big(x); 13 | getch(); 14 | 15 | } 16 | int big (int p) //formal variables 17 | { 18 | return(x); 19 | 20 | } -------------------------------------------------------------------------------- /PP.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b; 6 | clrscr(); 7 | printf("\n enter 2 nos"); 8 | scanf("d%d",&a,&b); 9 | if(b 2 | #include 3 | void main() 4 | { 5 | int x,*p,*p2; 6 | clrscr(); 7 | x=25; 8 | p=&x; 9 | p2=&p; 10 | printf("\n x value=%d", x); 11 | printf("\n adress of a x=%d", p); 12 | printf("\n adress of po+%d",p2); 13 | getch(); 14 | } 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /PR1.BAK: -------------------------------------------------------------------------------- 1 | /*prg to find sum and avg of three nums*/ 2 | #include 3 | #include 4 | int main() 5 | { 6 | float a,b,c,sum,avg; 7 | clrscr(); 8 | printf("\n enter three nums"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | sum=a+b+c; 11 | avg=sum/3; 12 | printf("\n sum of three nums=%f",sum); 13 | printf("\n sum of three nums=%f",sum); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PR1.C: -------------------------------------------------------------------------------- 1 | /*prg to find sum and avg of three nums*/ 2 | #include 3 | #include 4 | int main() 5 | { 6 | float a,b,c,sum,avg; 7 | clrscr(); 8 | printf("\n enter three nums"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | sum=a+b+c; 11 | avg=sum/3; 12 | printf("\n sum of three nums=%f",sum); 13 | printf("\n avg of three nums=%f",avg); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PR2.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/PR2.CPP -------------------------------------------------------------------------------- /PRAVEEN.CPP: -------------------------------------------------------------------------------- 1 | //program to demonstrate switch statement. 2 | #include 3 | #include 4 | void main() 5 | { 6 | char code; 7 | clrscr(); 8 | printf("enter the code:"); 9 | scanf("%s",&code); 10 | switch(code) 11 | { 12 | case 'f': 13 | printf("female"); 14 | break; 15 | case 'm': 16 | printf("male"); 17 | break; 18 | default: 19 | printf("invalid code"); 20 | } 21 | getch(); 22 | } -------------------------------------------------------------------------------- /PRG1.CPP: -------------------------------------------------------------------------------- 1 | //program to display a message 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | clrscr(); 9 | cout<<"\nWELCOME TO OOP WITH CPP"< 4 | #include 5 | 6 | void main() 7 | { 8 | float a,b,c,sum,avg; 9 | clrscr(); 10 | a=4.5; 11 | b=5.8; 12 | c=10.6; 13 | sum=a+b+c; 14 | avg=sum/3; 15 | printf("\n\ta=%f\n\tb=%f\n\tc=%f\n\tsum=%f\n\taverage=%f",a,b,c,sum,avg); 16 | getch(); 17 | } -------------------------------------------------------------------------------- /PRG2.CPP: -------------------------------------------------------------------------------- 1 | //program to display your BIODATA 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | clrscr(); 9 | cout<<"\n\t---------BIODATA------\n"; 10 | cout<<"\tName : xyz\n"; 11 | cout<<"\tAddress:Hosur Hubli \n"; 12 | cout<<"\tContact:65763547\n\tHobby:Reading Novels"; 13 | cout<<"\n\t-----------------------"; 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PRG3.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | float r,area; 7 | clrscr(); 8 | r=4.6; 9 | area=3.142*r*r; 10 | printf("\n\tr=%f\n\tarea of circle=%f",r,area); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /PRG3.C: -------------------------------------------------------------------------------- 1 | //program to find area of circle 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float r,area; 8 | clrscr(); 9 | r=4.6; 10 | area=3.142*r*r; 11 | printf("\n\tr=%f\n\tarea of circle=%f",r,area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /PRG4.BAK: -------------------------------------------------------------------------------- 1 | //program to find sum of 2 numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | a=100; 11 | b=200; 12 | sum=a+b; 13 | cout<<"\n\ta="< 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | a=100; 11 | b=200; 12 | sum=a+b; 13 | // cout<<"\n\ta="<>a>>b>>c; 11 | sum=a+b+c; 12 | avg=sum/3; 13 | cout<<"\n\ta="< 3 | #include 4 | 5 | void main() 6 | { 7 | float a,b,c,sum,avg; 8 | clrscr(); 9 | cout<<"\n\tenter values for a b c"; 10 | cin>>a>>b>>c; 11 | sum=a+b+c; 12 | avg=sum/3; 13 | cout<<"\n\ta="< 4 | #include 5 | 6 | void main() 7 | { 8 | float area,b,h; 9 | clrscr(); 10 | printf("\nenter values for base and height"); 11 | scanf("%f%f",&b,&h); 12 | area=0.5*b*h; 13 | printf("\n\tbase=%f\n\theight=%f\narea of triangle=%f",b,h,area); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /PRG7.C: -------------------------------------------------------------------------------- 1 | //program to find area of triangle 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float area,b,h; 9 | clrscr(); 10 | printf("\nenter values for base and height"); 11 | scanf("%f%f",&b,&h); 12 | area=0.5*b*h; 13 | printf("\n\tbase=%f\n\theight=%f\n\tarea of triangle=%f",b,h,area); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /PRG7.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/PRG7.CPP -------------------------------------------------------------------------------- /PRG8.BAK: -------------------------------------------------------------------------------- 1 | //program to check the person is eligible to VOTE or NOt 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int age; 9 | clrscr(); 10 | printf("\n\tenter age of the person"); 11 | scanf("%d",&age); 12 | if(age>=18) 13 | { 14 | printf("ELIGIBLE TO VOTE"); 15 | } 16 | getch(); 17 | } 18 | -------------------------------------------------------------------------------- /PRG8.C: -------------------------------------------------------------------------------- 1 | //program to check the person is eligible to VOTE or NOt 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int age; 9 | clrscr(); 10 | printf("\n\tenter age of the person"); 11 | scanf("%d",&age); 12 | if(age>=18) 13 | { 14 | printf("ELIGIBLE TO VOTE"); 15 | } 16 | printf("\n\tend of program"); 17 | getch(); 18 | } 19 | -------------------------------------------------------------------------------- /PRJ2MAK.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/PRJ2MAK.EXE -------------------------------------------------------------------------------- /PRJCFG.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/PRJCFG.EXE -------------------------------------------------------------------------------- /PRJCNVT.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/PRJCNVT.EXE -------------------------------------------------------------------------------- /PRODUCT.BAK: -------------------------------------------------------------------------------- 1 | //product of 3 numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,c,p; 9 | clrscr(); 10 | a=10; 11 | b=20; 12 | c=2; 13 | p=a*b*c; 14 | printf("\na=%d\nb=%d\nc=%d\nproduct=%d",a,b,c,p); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /PRODUCT.C: -------------------------------------------------------------------------------- 1 | //product of 3 numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,c,p; 9 | clrscr(); 10 | printf("\nenter 3 integer values\n"); 11 | scanf("%d%d%d",&a,&b,&c); 12 | p=a*b*c; 13 | printf("\na=%d\nb=%d\nc=%d\nproduct=%d",a,b,c,p); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PROG1.BAK: -------------------------------------------------------------------------------- 1 | //cpp program to find sum of two numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | cout<<"\n\tenter value for a and b"; 11 | cin>>a>>b; 12 | a=10; 13 | b=5; 14 | sum=a+b; 15 | cout<<"\n\ta="< 4 | #include 5 | 6 | void main() 7 | { 8 | clrscr(); 9 | printf("\n\tWELCOME TO C PROGRAMMING"); 10 | printf("\n\tC IS POP\n"); 11 | printf("\tdevelopped by \t \"dennies ritchie\""); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /PROG1.CPP: -------------------------------------------------------------------------------- 1 | //cpp program to find sum of two numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | cout<<"\n\tenter value for a and b"; 11 | cin>>a>>b; 12 | sum=a+b; 13 | cout<<"\n\ta="< 3 | #include 4 | 5 | void main() 6 | { 7 | float a,b,c,sum,avg; 8 | clrscr(); 9 | a=2.5; 10 | b=1.2; 11 | c=6.8; 12 | sum=a+b+c; 13 | avg=sum/3; 14 | printf("\n\ta=%f\n\tb=%f\n\tc=%f\n\tsum=%f\n\tavg=%f",a,b,c,sum,avg); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /PROG10.C: -------------------------------------------------------------------------------- 1 | //PROGRAM TO FIND SUM AND AVERAGE OF 3 NUMBERS 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float a,b,c,sum,avg; 8 | clrscr(); 9 | printf("\n\tenter values for a b c"); 10 | scanf("%f%f%f",&a,&b,&c); 11 | sum=a+b+c; 12 | avg=sum/3; 13 | printf("\n\ta=%f\n\tb=%f\n\tc=%f\n\tsum=%f\n\tavg=%f",a,b,c,sum,avg); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PROG2.BAK: -------------------------------------------------------------------------------- 1 | //program to display a line of text 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | clrscr(); 9 | printf("\n\tWELCOME TO C PROGRAM"); 10 | getch(); 11 | } -------------------------------------------------------------------------------- /PROG2.C: -------------------------------------------------------------------------------- 1 | //program to display a line of text 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | clrscr(); 9 | printf("\n\tWELCOME TO C PROGRAM"); 10 | getch(); 11 | } -------------------------------------------------------------------------------- /PROG2.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | void main() 6 | { 7 | float r,a,c,pi=3.142; 8 | clrscr(); 9 | cout<<"\n\tenter radius of the circle"; 10 | cin>>r; 11 | a=pi*r*r; 12 | c=2*pi*r; 13 | cout<<"\n\tradius="< 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,sum; 9 | clrscr(); 10 | printf("\nenter two numbers\n"); 11 | scanf("%d%d",&a,&b); 12 | sum=a+b; 13 | printf("\ta=%d\n\tb=%d\n\tsum=%d",a,b,sum); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PROG4.BAK: -------------------------------------------------------------------------------- 1 | //program to find are of the circle 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float r,area; 9 | clrscr(); 10 | printf("\nenter radius of the circle"); 11 | scanf("%f",&r); 12 | area=3.142*r*r; 13 | printf("\n\tr=%f\n\tarea=%f",r,area); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PROG4.C: -------------------------------------------------------------------------------- 1 | //program to find area of the circle 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float r,area; 9 | clrscr(); 10 | printf("\nenter radius of the circle"); 11 | scanf("%f",&r); 12 | area=3.142*r*r; 13 | printf("\n\tr=%f\n\tarea=%f",r,area); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PROG5.C: -------------------------------------------------------------------------------- 1 | //program to find simple interest 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float p,t,r,si; 9 | clrscr(); 10 | printf("\nenter values for p t r"); 11 | scanf("%f%f%f",&p,&t,&r); 12 | si=(p*t*r)/100; 13 | printf("\n\tp=%f\n\tt=%f\n\tr=%f\n\tsi=%f",p,t,r,si); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /PROG6.C: -------------------------------------------------------------------------------- 1 | //squre and cube of a given number 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int n,s,cube; 9 | clrscr(); 10 | printf("\n\tenter value for n"); 11 | scanf("%d",&n); 12 | s=n*n; 13 | cube=n*n*n; 14 | printf("\n\tnumber=%d\n\tsquare=%d\n\tcube=%d",n,s,cube); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /PROG8.BAK: -------------------------------------------------------------------------------- 1 | //program to check whether the entered year is leap year or not 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int year; 9 | clrscr(); 10 | printf("\nenter year"); 11 | scanf("%d",&year); 12 | (year%4==0)?printf("\n\tleap year"):printf("\n\tnot leap year"); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /PROG8.C: -------------------------------------------------------------------------------- 1 | //program to check whether the entered year is leap year or not 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int year; 9 | clrscr(); 10 | printf("\nenter year"); 11 | scanf("%d",&year); 12 | (year%4==0)?printf("\n\tleap year"):printf("\n\tnot leap year"); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /QUAND.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/QUAND.CPP -------------------------------------------------------------------------------- /QUANDRAN.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,c,x,y,sq1,s; 7 | clrscr(); 8 | printf("\n\tenter the value of a,b,c"); 9 | scanf("%d%d%d",&a,&b,&c); 10 | s=(b*b-4*a*c) 11 | sq1=sqrt(s); 12 | x=(-b+sq1)/(2*a); 13 | y=(-b-sq1)/(2*a); 14 | printf("\nx=%d\ny=%d",x,y); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /QUANDRAN.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,c,x,y,sq1,s; 7 | clrscr(); 8 | printf("\n\tenter the value of a,b,c"); 9 | scanf("%d%d%d",&a,&b,&c); 10 | s=(b*b-4*a*c); 11 | sq1=sqrt(s); 12 | x=(-b+sq1)/(2*a); 13 | y=(-b-sq1)/(2*a); 14 | printf("\nx=%d\ny=%d",x,y); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /QW.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int i,len=0; -------------------------------------------------------------------------------- /QWER.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a[5],i; 6 | clrscr(); 7 | printf("\n enter 5 numbers"); 8 | for(i=0;i<=4;i++) 9 | { 10 | scanf("%d",&a[i]); 11 | } 12 | printf("\n entered element"); 13 | for(i=0; i<=4; i++) 14 | { 15 | printf("\n %d\t%d\t%d\t%d",a[i],i[a],*(a+i),*(i+a)); 16 | } 17 | getch(); 18 | } -------------------------------------------------------------------------------- /R.BAK: -------------------------------------------------------------------------------- 1 | //reverse numbers from n 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int i,n; 9 | clrscr(); 10 | printf("\nenter final value"); 11 | scanf("%d",&n); 12 | printf("\n\treverse numbers from %d are\n",n); 13 | for(i=1;i<=n;n=n-2) 14 | { 15 | printf("\t%d\n",n); 16 | 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /R.C: -------------------------------------------------------------------------------- 1 | //reverse numbers from n 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int i,n; 9 | clrscr(); 10 | printf("\nenter final value"); 11 | scanf("%d",&n); 12 | printf("\n\treverse numbers from %d are\n",n); 13 | for(i=1;i<=n;n=n-2) 14 | { 15 | printf("\t%d\n",n); 16 | 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /R1.C: -------------------------------------------------------------------------------- 1 | /*Program to print a simple message*/ 2 | #include 3 | #include 4 | main() 5 | { 6 | clrscr(); 7 | printf("\n Welcome to C programming"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /R1.CPP: -------------------------------------------------------------------------------- 1 | //program to print simple message. 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n**************BIODATA**********************\N"); 8 | printf("\n Name : ABC "); 9 | printf("\n Address : Hosur"); 10 | printf("\n*****************END**********************\N"); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /R10.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | #define pi 3.142 5 | void main() 6 | { 7 | float area,r; 8 | clrscr(); 9 | printf("\n enter radius"); 10 | scanf("%f",&r); 11 | area=pi*r*r; 12 | printf("\n Area of a circle=%f",area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /R11.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a circle*/ 2 | #include 3 | #include 4 | #define pi 3.142 5 | void main() 6 | { 7 | float area,r; 8 | clrscr(); 9 | printf("\n enter radius"); 10 | scanf("%f",&r); 11 | area=pi*r*r; 12 | printf("\n Area of a circle=%f",area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /R13.C: -------------------------------------------------------------------------------- 1 | /*prg to find square root of a given no*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | float n,sq; 8 | clrscr(); 9 | printf("\n enter any no"); 10 | scanf("%f",&n); 11 | sq=sqrt(n); 12 | printf("\n square root of a given no=%f",sq); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /R14.C: -------------------------------------------------------------------------------- 1 | /*prg to find sum and avg of 3 nums*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float a,b,c,sum,avg; 8 | clrscr(); 9 | printf("\n enter 3 nos"); 10 | scanf("%f%f%f",&a,&b,&c); 11 | sum=a+b+c; 12 | avg=(sum/3); 13 | printf("\n sum=%f",sum); 14 | printf("\n average=%f",avg); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /R15.C: -------------------------------------------------------------------------------- 1 | /*prg to find biggest of 2 nums*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int a,b,big; 8 | clrscr(); 9 | printf("\n enter 2 nos"); 10 | scanf("%d%d",&a,&b); 11 | big=(a>b)?a:b; 12 | printf("\n big of 2 nums=%d",big); 13 | getch(); 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /R16.C: -------------------------------------------------------------------------------- 1 | /*prg to find biggest of 2 nums*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int a,b; 8 | clrscr(); 9 | printf("\n enter 2 nos"); 10 | scanf("%d%d",&a,&b); 11 | (a>b)?printf("\n big of 2 nums=%d",a):printf("\n big of 2 nums=%d",b); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /R17.C: -------------------------------------------------------------------------------- 1 | /*prg to check whether given num is +ve or -ve*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int a; 8 | clrscr(); 9 | printf("\n enter any no"); 10 | scanf("%d",&a); 11 | (a>0)?printf("\n +ve no"):printf("\n -ve no"); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /R18.C: -------------------------------------------------------------------------------- 1 | /*prg to check whether given num is even or odd*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int a; 8 | clrscr(); 9 | printf("\n enter any no"); 10 | scanf("%d",&a); 11 | (a%2==0)?printf("\n even no"):printf("\n odd no"); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /R2.C: -------------------------------------------------------------------------------- 1 | /*Program to print a simple message*/ 2 | #include 3 | #include 4 | main() 5 | { 6 | clrscr(); 7 | printf("\n all \n the \n best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /R3.BAK: -------------------------------------------------------------------------------- 1 | /*Program to print a simple message*/ 2 | #include 3 | #include 4 | main() 5 | { 6 | clrscr(); 7 | printf("\n \t all \t the \t best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /R3.C: -------------------------------------------------------------------------------- 1 | /*Program to print a simple message*/ 2 | #include 3 | #include 4 | main() 5 | { 6 | clrscr(); 7 | printf("\n \t all \n\t the \n\t best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /R4.BAK: -------------------------------------------------------------------------------- 1 | /*Program to demonstrate increment operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=10,j=20; 7 | clrscr(); 8 | //prefix increment 9 | printf("\n After incrementing i=%d",(++i)); 10 | //postfix increment 11 | printf("\n After increment j=%d",(j++)); 12 | printf("\n j=%d",j); 13 | 14 | getch(); 15 | } -------------------------------------------------------------------------------- /R4.C: -------------------------------------------------------------------------------- 1 | /*Program to demonstrate increment operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=10,j=20; 7 | clrscr(); 8 | //prefix increment 9 | printf("\n After incrementing i=%d",(++i)); 10 | //postfix increment 11 | printf("\n After increment j=%d",(j++)); 12 | printf("\n j=%d",j); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /R4.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/R4.CPP -------------------------------------------------------------------------------- /R5.BAK: -------------------------------------------------------------------------------- 1 | /*Program to demonstrate decrement operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=10,j=20; 7 | clrscr(); 8 | //prefix decrement 9 | printf("\n After decrementing i=%d",(--i)); 10 | //postfix decrement 11 | printf("\n After increment j=%d",(j--)); 12 | printf("\n j=%d",j); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /R5.C: -------------------------------------------------------------------------------- 1 | /*Program to demonstrate decrement operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=10,j=20; 7 | clrscr(); 8 | //prefix decrement 9 | printf("\n After decrementing i=%d",(--i)); 10 | //postfix decrement 11 | printf("\n After decrement j=%d",(j--)); 12 | printf("\n j=%d",j); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /R6.C: -------------------------------------------------------------------------------- 1 | /*Program to find sum of two numbers*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,sum; 7 | clrscr(); 8 | printf("\n Enter any two numbers"); 9 | scanf("%d%d",&a,&b); 10 | sum=a+b; 11 | printf("\n sum of two numbers=%d",sum); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /R8.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a traingle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,b,h; 7 | clrscr(); 8 | printf("\n enter base and height "); 9 | scanf("%f%f",&b,&h); 10 | area=0.5*b*h; 11 | printf("\n Area of a traingle =%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /R9.C: -------------------------------------------------------------------------------- 1 | /*prg to find area of a rectangle*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,b,l; 7 | clrscr(); 8 | printf("\n enter length and breadth"); 9 | scanf("%f%f",&l,&b); 10 | area=l*b; 11 | printf("\n Area of a rectangle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /R9.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/R9.CPP -------------------------------------------------------------------------------- /RAJ.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("wel come to the raju by home"); 7 | getch(); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /RAJ1.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("\n all \n my \n love"); 7 | getch(); 8 | 9 | } -------------------------------------------------------------------------------- /RAJ10.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float pi=3.142,r,area; 6 | clrscr(); 7 | printf("\n enter radius \n"); 8 | scanf("%f",&r); 9 | area=pi*r*r; 10 | printf("\n Area of circle =%f",area); 11 | getch(); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /RAJ11.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,a,b,c,s; 7 | clrscr(); 8 | printf("\n enter three slides"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | s=(a+b+c)/2; 11 | area=sqrt(s*(s-a)*(s-b)*(s-c)); 12 | printf("\n area of tringle =%f",area); 13 | getch(); 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /RAJ12.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int p,t; 6 | float r,si; 7 | clrscr(); 8 | printf("\n enter p t r \n"); 9 | scanf("%d%d%f",&p,&t,&r); 10 | si=(p*t*r)/100; 11 | printf("\n simple interest=%f",si); 12 | getch(); 13 | } 14 | -------------------------------------------------------------------------------- /RAJ13.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b; 6 | clrscr(); 7 | printf("\n enter two num \n"); 8 | scanf("%d%d",&a,&b); 9 | (a>b)?printf("first num is big"):printf("second num is big"); 10 | getch(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /RAJ14.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b,res; 6 | clrscr(); 7 | printf("\n enter two num \n"); 8 | scanf("%d%d",&a,&b); 9 | res=(a>b)? a:b; 10 | printf("\n %d is big",res); 11 | getch(); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /RAJ15.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int n; 6 | clrscr(); 7 | printf("\n enter any num \n"); 8 | scanf("%d",&n); 9 | (n%2==0)?printf("\n %d is even ",n):printf("\n %d is odd",n); 10 | getch(); 11 | } 12 | -------------------------------------------------------------------------------- /RAJ17.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int n; 6 | clrscr(); 7 | printf("\n enter any num \n"); 8 | scanf("%d",&n); 9 | (n>0)?printf("\n %d is +ve ",n):printf("\n %d is -ve",n); 10 | getch(); 11 | } 12 | -------------------------------------------------------------------------------- /RAJ2.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("\n all"); 7 | printf("\n my"); 8 | printf(" \n love"); 9 | getch(); 10 | 11 | } -------------------------------------------------------------------------------- /RAJ25.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float n; 6 | clrscr(); 7 | printf("enter any num\n"); 8 | scanf("%d",&n); 9 | (n>0)?printf("%d is +ve",n):printf("%d is -ve",n); 10 | getch(); 11 | } 12 | -------------------------------------------------------------------------------- /RAJ26.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int yr; 6 | clrscr(); 7 | printf("enter any year \n"); 8 | scanf("%d",&yr); 9 | (yr%4==0)?printf("%d is leap year",yr):printf("%d is not leap year",yr); 10 | getch(); 11 | } 12 | -------------------------------------------------------------------------------- /RAJ27.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b; 6 | clrscr(); 7 | printf("\n enter two nums"); 8 | scanf("%d%d",&a,&b); 9 | if(a>b)printf("\n a is big"); 10 | if(b>a)printf("\n b is big"); 11 | getch(); 12 | } 13 | -------------------------------------------------------------------------------- /RAJ28.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int n;clrscr();printf("\n enter any num"); 6 | scanf("%d",&n); 7 | if(n%2==0) 8 | printf("\n %d is even no",n); 9 | else 10 | printf("\n %d is odd no",n); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /RAJ29.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int n; 6 | clrscr(); 7 | printf("\n enter any num \n "); 8 | scanf("%d",&n); 9 | if(n%2==0) 10 | printf("%d is even num",n); 11 | else 12 | printf("%d is odd num ",n); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /RAJ30.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int n; 6 | clrscr(); 7 | printf("\n enter any num \n"); 8 | scanf("%d",&n); 9 | if(n>0) 10 | printf("%d is a +ve no",n); 11 | else 12 | printf("%d is a -ve num",n); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /RAJ31.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b,c; 6 | clrscr(); 7 | printf("\n enter three num \n"); 8 | scanf("%d%d%d",&a,&b,&c); 9 | if(a>b) 10 | if(a>c) 11 | printf("%d is big",a); 12 | else 13 | printf("%d is big",c); 14 | else if(b>c) 15 | printf("%d is big",b); 16 | else 17 | printf("%d is big",c); 18 | getch(); 19 | } 20 | 21 | -------------------------------------------------------------------------------- /RAJ32.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | char ch; 6 | clrscr(); 7 | printf("\n enter any charecter \n "); 8 | scanf("%c",&ch); 9 | if(ch>='A'&&ch<='Z'||ch>='a'&&ch<='z') 10 | printf("%c is a alphabet",ch); 11 | else if(ch>='0'&&ch<='9') 12 | printf("%c is a digit",ch); 13 | else 14 | printf("%c is a special character",ch); 15 | getch(); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /RAJ33.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | void main() 5 | { 6 | char ch; 7 | clrscr(); 8 | printf("\n enter any charecter \n"); 9 | scanf("%c",&ch); 10 | if(isalpha(ch)) 11 | printf("\n %c is a alphabet",ch); 12 | else if(isdigit(ch)) 13 | printf("\n %c is a digit",ch); 14 | else 15 | printf("%c is a special charecter",ch); 16 | getch(); 17 | } 18 | 19 | -------------------------------------------------------------------------------- /RAJ34.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | char ch; 6 | clrscr(); 7 | printf("\n enter any charecter"); 8 | scanf("%c",&ch); 9 | if(ch>=65&&ch<=90||ch>=9&&ch<=122) 10 | printf("%c is a alphabet",ch); 11 | else if(ch>=48&&ch<=57) 12 | printf("\n %c is a digit",ch); 13 | else 14 | printf("%c is special charecter",ch); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /RAJ4.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b,sum; 6 | clrscr(); 7 | printf("\n enter two num"); 8 | scanf("%d%d",&a,&b); 9 | sum=a+b; 10 | printf("\n sum of two num=%d",sum); 11 | getch(); 12 | 13 | } -------------------------------------------------------------------------------- /RAJ5.C: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,temp; 7 | clrscr(); 8 | printf("\n enter 2 num \n"); 9 | scanf("%d%d",&a,&b); 10 | printf("\n before swapping a=%d \t b=%d \t",a,b); 11 | temp=a;a=b;b=temp; 12 | printf("\n after swapping a=%d \t b=%d",a,b); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /RAJ6.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b; 6 | clrscr(); 7 | printf("\n enter two num \n"); 8 | scanf("%d%d",&a,&b); 9 | printf("\n before swapping a=%d \t b=%d",a,b); 10 | a=a+b; 11 | b=a-b; 12 | a=a-b; 13 | printf("\n after swapping a=%d \t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /RAJ7.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float a,b,c,sum; 6 | float avg; 7 | clrscr(); 8 | printf("\n enter three num\n"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | sum=(a+b+c); 11 | avg=sum/3; 12 | printf("\n sum of three num =%f",sum); 13 | printf("\n avg of three num=%f",avg); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /RAJ8.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float b,h,area; 6 | clrscr(); 7 | printf("\n enter base and height "); 8 | scanf("%f%f",&b,&h); 9 | area=0.5*b*h; 10 | printf("\n Area of tringle =%f",area); 11 | getch(); 12 | } 13 | -------------------------------------------------------------------------------- /RAJ9.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float l,b,area; 6 | clrscr(); 7 | printf("\n enter base and length \n "); 8 | scanf("%f%f",&l,&b); 9 | area=l*b; 10 | printf("\n area of rectangle =%f ",area); 11 | getch(); 12 | } 13 | -------------------------------------------------------------------------------- /RAJU1.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("\n wel come to c programming"); 7 | getch(); 8 | } -------------------------------------------------------------------------------- /RAJU2.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("\n all"); 7 | printf("\n the"); 8 | printf("\n best"); 9 | getch(); 10 | } -------------------------------------------------------------------------------- /RAJU3.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("\n all \n the \n best"); 7 | getch(); 8 | } 9 | -------------------------------------------------------------------------------- /RAJU5.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int a,b,sum; 6 | clrscr(); 7 | printf("\n enter two num\n"); 8 | scanf("%d%d",&a,&b); 9 | sum=a+b; 10 | printf("\n sum of the num=%d",sum); 11 | getch(); 12 | } 13 | -------------------------------------------------------------------------------- /RASHMI.C: -------------------------------------------------------------------------------- 1 | /*prg to disply a simple message 2 | prg writtwn by xyz */ 3 | #include 4 | #include 5 | void main() 6 | { 7 | int n; 8 | clrscr(); 9 | printf("\n enter any num") 10 | scanf("%d",&a) 11 | } -------------------------------------------------------------------------------- /RCCP.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/RCCP.CPP -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## C & C++ -Program PPT 2 | - [Link](https://github.com/RashmivernekarN/C-Program2/tree/main) 3 | -------------------------------------------------------------------------------- /RECTANGL.BAK: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float b,l,area; 8 | clrscr(); 9 | printf("\n\tenter length and breadth of rectangle"); 10 | scanf("%f%f",&l,&b); 11 | area=l*b; 12 | printf("\n\tarea of ractangle\n\tlength=%f\n\tbreadth=%f\n\tarea=%f",l,b,area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /RECTANGL.C: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float b,l,area; 8 | clrscr(); 9 | printf("\n\tenter length and breadth of rectangle"); 10 | scanf("%f%f",&l,&b); 11 | area=l*b; 12 | printf("\n\tarea of ractangle\n\tlength=%f\n\tbreadth=%f\n\tarea=%f",l,b,area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /REFERANC.BAK: -------------------------------------------------------------------------------- 1 | //program to illustrate referance variable 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int sum; 8 | clrscr(); 9 | sum=10; 10 | int &total=sum;//reference variable declaration 11 | cout<<"\n\tsum="< 4 | #include 5 | 6 | void main() 7 | { 8 | int i,n; 9 | clrscr(); 10 | printf("\nenter final value"); 11 | scanf("%d",&n); 12 | printf("\n\treverse numbers from %d are\n",n); 13 | for(i=1;i<=n;n--) 14 | { 15 | printf("\t%d\n",n); 16 | 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /REV1.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int i,n; 7 | clrscr(); 8 | printf("\n\tenter final value"); 9 | scanf("%d",&n); 10 | i=1; 11 | do 12 | { 13 | printf("\n\t%d",n); 14 | n--; 15 | }while(i<=n); 16 | getch(); 17 | } -------------------------------------------------------------------------------- /REV1.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int i,n; 7 | clrscr(); 8 | printf("\n\tenter final value"); 9 | scanf("%d",&n); 10 | printf("\n\treverse numbers from %d are\n",n); 11 | i=1; 12 | do 13 | { 14 | printf("\n\t%d",n); 15 | n--; 16 | }while(i<=n); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /REV2.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int i,n; 7 | clrscr(); 8 | printf("\n\tenter final value"); 9 | scanf("%d",&n); 10 | printf("\n\treverse odd numbers from %d are\n",n); 11 | i=1; 12 | do 13 | { 14 | printf("\n\t%d",n); 15 | n=n-2;; 16 | }while(i<=n); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /REV2.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int i,n; 7 | clrscr(); 8 | printf("\n\tenter final value"); 9 | scanf("%d",&n); 10 | printf("\n\treverse odd numbers from %d are\n",n); 11 | i=1; 12 | do 13 | { 14 | printf("\n\t%d",n); 15 | n=n-2; 16 | }while(i<=n); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /RISHAB.BAK: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | void main() 5 | { 6 | float n,s=0,i=1; 7 | clrscr(); 8 | printf("\n Enter any no"); 9 | scanf("%f",&n); 10 | do 11 | { 12 | s=s+1/i; 13 | i++; 14 | }while(i<=n); 15 | printf("\n sum of 1+1/2+1/3...1/n is %f",s); 16 | getch(); 17 | } 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /RISHAB.C: -------------------------------------------------------------------------------- 1 | //prog to find sum of 1+1/2+1/3... 1/n 2 | #include 3 | #include 4 | void main() 5 | { 6 | float n,s=0,i=1; 7 | clrscr(); 8 | printf("\n Enter any no"); 9 | scanf("%f",&n); 10 | do 11 | { 12 | s=s+1/i; 13 | i++; 14 | }while(i<=n); 15 | printf("\n sum of 1+1/2+1/3...1/n is %f",s); 16 | getch(); 17 | } 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /RISHAB2.BAK: -------------------------------------------------------------------------------- 1 | //prog to find sum of 1*1/2*1/3... 1/n 2 | #include 3 | #include 4 | void main() 5 | { 6 | float n,p=0,i=1; 7 | clrscr(); 8 | printf("\n Enter any no"); 9 | scanf("%f",&n); 10 | do 11 | { 12 | p=p*1/i; 13 | i++; 14 | }while(i<=n); 15 | printf("\n sum of 1X1/2X1X3...1/n is %f",p); 16 | getch(); 17 | } 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /RISHAB2.C: -------------------------------------------------------------------------------- 1 | //prog to find sum of 1*1/2*1/3... 1/n 2 | #include 3 | #include 4 | void main() 5 | { 6 | float n,p=1,i=1; 7 | clrscr(); 8 | printf("\n Enter any no"); 9 | scanf("%f",&n); 10 | do 11 | { 12 | p=p*1/i; 13 | i++; 14 | }while(i<=n); 15 | printf("\n sum of 1X1/2X1X3...1/n is %f",p); 16 | getch(); 17 | } 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /RK.C: -------------------------------------------------------------------------------- 1 | /*example to demonstrate use of reference operator in C programming.*/ 2 | #include 3 | int main() 4 | { 5 | int var=5; 6 | clrscr(); 7 | printf("value:%d\n",var); 8 | printf("address:%d",&var); //notice,the ampersand(&)before var. 9 | return 0; 10 | } -------------------------------------------------------------------------------- /RK2.C: -------------------------------------------------------------------------------- 1 | //program to find the sum of six numbers with arrays and pointers. 2 | #include 3 | int main() 4 | { 5 | int i,a[6],sum=0; 6 | clrscr(); 7 | printf("enter 6 numbers:\n"); 8 | for(i=0;i<6;++i) 9 | { 10 | scanf("%d",(a+i));//(a+i)is equivalent to &a[i] 11 | sum+=*(a*i);//*(a+i)is equivalent to a[i] 12 | } 13 | printf("sum=%d",sum); 14 | return 0; 15 | } -------------------------------------------------------------------------------- /RK3.C: -------------------------------------------------------------------------------- 1 | //prg to print first 10 fibonacci nums 2 | #include 3 | #include 4 | int main() 5 | { 6 | int i=1; 7 | clrscr(); 8 | while(i<=100) 9 | { 10 | if(i%5==0 &&i%7==0) 11 | { 12 | cout< 3 | #include 4 | int main() 5 | { 6 | int i=1; 7 | clrscr(); 8 | while(i<=100) 9 | { 10 | if(i%5==0 &&i%7==0) 11 | { 12 | cout< 3 | #include 4 | void main() 5 | { 6 | int x; 7 | float y; 8 | char ch; 9 | double d; 10 | clrscr(); 11 | printf("\n size of x=%d bytes",sizeof(x)); 12 | printf("\n size of y=%d bytes",sizeof(y)); 13 | printf("\n size of ch=%d bytes",sizeof(ch)); 14 | printf("\n size of d=%d bytes",sizeof(d)); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /S.CPP: -------------------------------------------------------------------------------- 1 | //program to display simple message 2 | #include 3 | using namespace std; 4 | int main() 5 | { 6 | couut<<"wel come to c++"; 7 | return 0; 8 | } -------------------------------------------------------------------------------- /S1.BAK: -------------------------------------------------------------------------------- 1 | /*prg to find sum and avg of 3 nums*/ 2 | #include 3 | #include 4 | int main() 5 | { 6 | float a,b,c,sum,avg; 7 | clrscr(); 8 | printf("\n Enter three nums"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | sum=a+b+c; 11 | avg=sum/3; 12 | printf("\n sum=%f \t avg=%f",sum,avg); 13 | getch(); 14 | } 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /S1.C: -------------------------------------------------------------------------------- 1 | //prg to read a string and print the same 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | scanf("%s",str); 10 | printf("\n Entered string is %s",str); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /S1.CPP: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | char name[20]; 7 | clrscr(); 8 | cout<<"\n Enter your name"; 9 | cin>>name; 10 | cout<<"My name is "< 3 | #include 4 | void main () 5 | { 6 | int n,fact=1,i=1; 7 | clrscr(); 8 | printf ("\n enter any number"); 9 | scanf("%d",&n); 10 | while (i<=n) 11 | { 12 | fact=fact*i; 13 | i++; 14 | } 15 | printf ("\n factorial of given number=%d",fact); 16 | getch(); 17 | } -------------------------------------------------------------------------------- /S17.C: -------------------------------------------------------------------------------- 1 | /*prg to accept a number and find sum of 1 to N number*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int n,sum=0,i=1; 7 | clrscr(); 8 | printf ("\n enter any number"); 9 | scanf("%d",&n); 10 | while (i<=n) 11 | { 12 | sum=sum+i; 13 | } 14 | printf ("\n sum of 1 to N number=%d",sum); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /S18.C: -------------------------------------------------------------------------------- 1 | /*prg to print 5 to 1 number using while loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i=5; 7 | clrscr(); 8 | while (i>=1) 9 | { 10 | printf ("\n\t %d",i); 11 | i--; 12 | } 13 | getch(); 14 | } -------------------------------------------------------------------------------- /S19.C: -------------------------------------------------------------------------------- 1 | /*prg to print 1 to 5 number using while loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i=1; 7 | clrscr(); 8 | while (i<=5) 9 | { 10 | printf ("\n\t %d",i); 11 | i++; 12 | } 13 | getch(); 14 | } -------------------------------------------------------------------------------- /S2.BAK: -------------------------------------------------------------------------------- 1 | //prg to read a string and print the same 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | scanf("%s",str); 10 | printf("\n Entered string is %s",str); 11 | getch(); 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /S2.C: -------------------------------------------------------------------------------- 1 | //prg to read a string and print the same 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf("\n Enter any string"); 9 | gets(str); 10 | printf("\n Entered string is %s",str); 11 | getch(); 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /S29.C: -------------------------------------------------------------------------------- 1 | /*prg to find check whether the given year 2 | is leap year or not using if else*/ 3 | #include 4 | #include 5 | void main () 6 | { 7 | int year; 8 | clrscr(); 9 | printf ("\n enter any year"); 10 | scanf ("%d",&year); 11 | if (year%4==0) 12 | printf ("\n is leap year"); 13 | else 14 | printf ("\n is not leap year"); 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /S30.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate decrement operation*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i=5,j=10; 7 | clrscr(); 8 | //postfix 9 | printf ("\n\n\t i value=%d",i--); 10 | 11 | //perfix 12 | printf ("\n\t j value=%d",--j); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /S31.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate increment operation*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i=5,j=10; 7 | clrscr(); 8 | //postfix 9 | printf ("\n\n\t i value=%d",i++); 10 | 11 | //perfix 12 | printf ("\n\t j value=%d",++j); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /S32.C: -------------------------------------------------------------------------------- 1 | /*prg to calculate simple intrest*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int p,t; 7 | float r,si; 8 | clrscr(); 9 | printf ("\n enter p t r"); 10 | scanf ("%d%d%f",&p,&t,&r); 11 | si=(p*t*r)/100; 12 | printf ("\n simple intrest=%f",si); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /S33.C: -------------------------------------------------------------------------------- 1 | /*prg to find sum and average of 3 number*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int a,b,c,sum,average; 7 | clrscr(); 8 | printf ("\n enter 3 number"); 9 | scanf ("%d%d%d",&a,&b,&c); 10 | sum=a+b+c; 11 | average=sum/3; 12 | printf ("\n sum of 3 number=%d",sum); 13 | printf ("\n average of 3 number=%d",average); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /S34.C: -------------------------------------------------------------------------------- 1 | /*prg to print number 1 ti 5 using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i; 7 | clrscr(); 8 | printf ("\n enter 1 to 5 number are:"); 9 | for (i=1;i<=5;i++) 10 | { 11 | printf ("\n %d",i); 12 | } 13 | getch(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /S35.C: -------------------------------------------------------------------------------- 1 | /*prg to print number 5 to 1 using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i; 7 | clrscr(); 8 | printf ("\n enter 5 to 1 number are:"); 9 | for (i=5;i>=1;i--) 10 | { 11 | printf ("\n %d",i); 12 | } 13 | getch(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /S36.C: -------------------------------------------------------------------------------- 1 | /*prg to find sum of 1 to N number using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i,n,sum=0; 7 | clrscr(); 8 | printf ("\n enter any number"); 9 | scanf ("%d",&n); 10 | for (i=1;i<=n;i++) 11 | { 12 | sum=sum+i; 13 | } 14 | printf ("\n sum of 1 to N number=%d",sum); 15 | getch(); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /S37.C: -------------------------------------------------------------------------------- 1 | /*prg to find factorial of a given number using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i,n,fact=1; 7 | clrscr(); 8 | printf ("\n enter any number"); 9 | scanf ("%d",&n); 10 | for (i=1;i<=n;i++) 11 | { 12 | fact=fact*i; 13 | } 14 | printf ("\n factorial of a given number=%d",fact); 15 | getch(); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /S39.C: -------------------------------------------------------------------------------- 1 | /*prg to find fibonacci series by using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i,f1=-1,f2=1,f3,n; 7 | clrscr(); 8 | printf ("\n enter any number"); 9 | scanf ("%d",&n); 10 | for (i=1;i<=n;i++) 11 | { 12 | f3=f1+f2; 13 | printf ("\n %d",f3); 14 | f1=f2; 15 | f2=f3; 16 | } 17 | getch(); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /S40.C: -------------------------------------------------------------------------------- 1 | /*prg to print first ten even numberu by using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i; 7 | clrscr(); 8 | printf ("\n enter first ten even number"); 9 | for (i=1;i<=20;i++) 10 | { 11 | if (i%2==0) 12 | printf ("\n %d",i); 13 | } 14 | getch(); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /S41.C: -------------------------------------------------------------------------------- 1 | /*prg to print number 50 to 75 which are divisible by 5 by using for loop*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i; 7 | clrscr(); 8 | printf ("\n enter number which are divisible by 5"); 9 | for (i=50;i<=75;i++) 10 | { 11 | if (i%5==0) 12 | printf ("\n %d",i); 13 | } 14 | getch(); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /S42.C: -------------------------------------------------------------------------------- 1 | /*prg to print number 1 to 75 which are divisible 2 | by 5 and 7 by using for loop*/ 3 | #include 4 | #include 5 | void main () 6 | { 7 | int i; 8 | clrscr(); 9 | printf ("\n enter number which are divisible by 5 and 7"); 10 | for (i=1;i<=75;i++) 11 | { 12 | if (i%5==0 && i%7==0) 13 | printf ("\n %d",i); 14 | } 15 | getch(); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /S43.C: -------------------------------------------------------------------------------- 1 | /*prg to print below format 2 | 1 3 | 1 2 4 | 1 2 3 5 | 1 2 3 4*/ 6 | #include 7 | #include 8 | void main () 9 | { 10 | int i,j; 11 | clrscr(); 12 | for (i=1;i<=4;i++) 13 | { 14 | for (j=1;j<=i;j++) 15 | { 16 | printf ("%3d",j); 17 | } 18 | printf ("\n"); 19 | } 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /S44.C: -------------------------------------------------------------------------------- 1 | /*prg to print below format 2 | 1 3 | 2 2 4 | 3 3 3 5 | 4 4 4 4*/ 6 | #include 7 | #include 8 | void main () 9 | { 10 | int i,j; 11 | clrscr(); 12 | for (i=1;i<=4;i++) 13 | { 14 | for (j=1;j<=i;j++) 15 | { 16 | printf ("%3d",i); 17 | } 18 | printf ("\n"); 19 | } 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /S45.C: -------------------------------------------------------------------------------- 1 | /*prg to print below format 2 | * 3 | * * 4 | * * * 5 | * * * * 6 | */ 7 | #include 8 | #include 9 | void main () 10 | { 11 | int i,j; 12 | clrscr(); 13 | for (i=1;i<=4;i++) 14 | { 15 | for (j=1;j<=i;j++) 16 | { 17 | printf ("\t*"); 18 | } 19 | printf ("\n"); 20 | } 21 | getch(); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /S46.C: -------------------------------------------------------------------------------- 1 | /*prg to print below format 2 | * * * 3 | * * * 4 | * * * 5 | */ 6 | #include 7 | #include 8 | void main () 9 | { 10 | int i,j; 11 | clrscr(); 12 | for (i=1;i<=3;i++) 13 | { 14 | for (j=1;j<=i;j++) 15 | { 16 | printf ("\t*"); 17 | } 18 | printf ("\n"); 19 | } 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /S47.C: -------------------------------------------------------------------------------- 1 | /*prg to print below format 2 | 1 2 3 3 | 1 2 3 4 | 1 2 3 5 | */ 6 | #include 7 | #include 8 | void main () 9 | { 10 | int i,j; 11 | clrscr(); 12 | for (i=1;i<=3;i++) 13 | { 14 | for (j=1;j<=3;j++) 15 | { 16 | printf ("%3d",j); 17 | } 18 | printf ("\n"); 19 | } 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /S48.C: -------------------------------------------------------------------------------- 1 | /*prg to print below format 2 | 1 1 1 3 | 2 2 2 4 | 3 3 3 5 | */ 6 | #include 7 | #include 8 | void main () 9 | { 10 | int i,j; 11 | clrscr(); 12 | for (i=1;i<=3;i++) 13 | { 14 | for (j=1;j<=3;j++) 15 | { 16 | printf ("%3d",i); 17 | } 18 | printf ("\n"); 19 | } 20 | getch(); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /S49.C: -------------------------------------------------------------------------------- 1 | /*prg to read 5 number and print the same by using array*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int a[5],i; 7 | clrscr(); 8 | printf ("\n enter any 5 number"); 9 | for (i=0;i<5;i++) 10 | { 11 | scanf ("%d",&a[i]); 12 | } 13 | printf ("\n entered number are:\n"); 14 | for (i=0;i<5;i++) 15 | { 16 | printf ("\n\t %d",a[i]); 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /S5.BAK: -------------------------------------------------------------------------------- 1 | //prg to read a string and convert it to uppercase string 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | 8 | char str1[20],str2[20]; 9 | clrscr(); 10 | printf("\n Enter first string"); 11 | gets(str1); 12 | str2=strupr(str1); 13 | printf("\n Uppercase string is %s",str2); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /S5.C: -------------------------------------------------------------------------------- 1 | //prg to read a string and convert it to uppercase string 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | 8 | char str1[20]; 9 | clrscr(); 10 | printf("\n Enter first string"); 11 | gets(str1); 12 | strupr(str1); 13 | printf("\n Uppercase string is %s",str1); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /S50.C: -------------------------------------------------------------------------------- 1 | /*prg to read 5 number and reverse the same by using array*/ 2 | #include 3 | #include 4 | void main () 5 | { 6 | int a[5],i; 7 | clrscr(); 8 | printf ("\n enter any 5 number"); 9 | for (i=0;i<5;i++) 10 | { 11 | scanf ("%d",&a[i]); 12 | } 13 | printf ("\n reversed number are:\n"); 14 | for (i=4;i>0;i--) 15 | { 16 | printf ("\t %d",a[i]); 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /S6.C: -------------------------------------------------------------------------------- 1 | //prg to read a string and convert it to lowercase string 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | 8 | char str1[20]; 9 | clrscr(); 10 | printf("\n Enter first string"); 11 | gets(str1); 12 | strlwr(str1); 13 | printf("\n Lowercase string is %s",str1); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /S6.CPP: -------------------------------------------------------------------------------- 1 | /*prg to read a string and reverse the string 2 | using built in functions*/ 3 | #include 4 | #include 5 | #include 6 | int main () 7 | { 8 | 9 | char str1[30]; 10 | clrscr(); 11 | cout<<"\n Enter any string"; 12 | cin>>str1; 13 | cout<<"\n Given string is"< 3 | #include 4 | int sum(int,int);//prototype declaration 5 | void main() 6 | { 7 | int a,b,s; 8 | clrscr(); 9 | printf ("\n enter any 2 number"); 10 | scanf ("%d%d",&a,&b); 11 | s=sum(a,b); 12 | printf ("\n sum=%d",s); 13 | getch(); 14 | } 15 | int sum(int x,int y) 16 | { 17 | int z; 18 | z=x+y; 19 | return(z); 20 | } -------------------------------------------------------------------------------- /S7.C: -------------------------------------------------------------------------------- 1 | //prg to read a string and reverse the same string 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | 8 | char str1[20]; 9 | clrscr(); 10 | printf("\n Enter first string"); 11 | gets(str1); 12 | strrev(str1); 13 | printf("\n Reversed string is %s",str1); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /S74.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf ("\n enter any string"); 9 | scanf ("%s",str); 10 | printf ("\n entered string is :%s",str); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /S75.BAK: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf ("\n enter any string"); 9 | gets(str); 10 | printf ("\n entered string is :%s",str); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /S75.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str[20]; 7 | clrscr(); 8 | printf ("\n enter any string"); 9 | gets(str); 10 | 11 | printf ("\n entered string is =%s",str); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /S76.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and length of string*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i,len=0; 7 | char str[20]; 8 | clrscr(); 9 | printf ("\n enter any string"); 10 | gets(str); 11 | for (i=0;str[i]!='\0';i++) 12 | { 13 | len=len+1; 14 | } 15 | printf ("\n entered string is :%s",str); 16 | printf ("\n length of the given string is %d",len); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /S77.BAK: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str1[20]; 7 | clrscr(); 8 | printf ("\n Enter any string"); 9 | //scanf("%s",str1); 10 | gets(str1); 11 | printf("\n Entered string is %s",str1); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /S77.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str1[20]; 7 | clrscr(); 8 | printf ("\n Enter any string"); 9 | //scanf("%s",str1); 10 | gets(str1); 11 | printf("\n Entered string is %s",str1); 12 | getch(); 13 | 14 | } -------------------------------------------------------------------------------- /S79.C: -------------------------------------------------------------------------------- 1 | /*prg to concatenate 2 string*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i; 7 | char str1[20],str2[20]; 8 | clrscr(); 9 | printf ("\n enter 1st string"); 10 | gets(str1); 11 | for (i=0;str1[i]!='\0';i++) 12 | { 13 | str1[i]=str2[i]; 14 | } 15 | str2[i]='\0'; 16 | printf ("\n concatenated string is :%s",str1); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /S8.CPP: -------------------------------------------------------------------------------- 1 | /*prg to concat two strings using built in functions*/ 2 | #include 3 | #include 4 | #include 5 | int main () 6 | { 7 | 8 | char str1[30],str2[30]; 9 | clrscr(); 10 | cout<<"\n Enter first string"; 11 | cin>>str1; 12 | cout<<"\n Enter second string"; 13 | cin>>str2; 14 | strcat(str1,str2); 15 | cout<<"Concatenated string is:"< 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20],str2[20]; 8 | clrscr(); 9 | printf ("\n enter any string"); 10 | gets(str1); 11 | strcpy(str2,str1); 12 | printf ("\n entered string is :%s",str1); 13 | printf ("\n copied string is :%s",str2); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /S80.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and copy it into another string using function*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20],str2[20]; 8 | clrscr(); 9 | printf ("\n enter any string"); 10 | gets(str1); 11 | strcpy(str2,str1); 12 | printf ("\n entered string is :%s",str1); 13 | printf ("\n copied string is :%s",str2); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /S81.C: -------------------------------------------------------------------------------- 1 | /*prg to read a 2 string and concatenate 2 string using function*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20],str2[20]; 8 | clrscr(); 9 | printf ("\n enter 1st string"); 10 | gets(str1); 11 | printf ("\n enter 2nd string"); 12 | gets(str2); 13 | strcat(str1,str2); 14 | printf ("\n concatenated string :%s",str1); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /S82.BAK: -------------------------------------------------------------------------------- 1 | /*prg to read a reverse a string using function*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf ("\n enter 1st string"); 10 | gets(str1); 11 | strrev(str1); 12 | printf ("\n reversed string is :%s",str1); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /S82.C: -------------------------------------------------------------------------------- 1 | /*prg to read a string and reverse the same string using function*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | printf ("\n enter 1st string"); 10 | gets(str1); 11 | strrev(str1); 12 | printf ("\n reversed string is :%s",str1); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /S88.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate adderss of the variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x=25,y; 7 | y=&x; 8 | clrscr(); 9 | printf ("\n x value=%d",x); 10 | printf ("\n address of x=%d",y); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /S89.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate pointer variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x,*P,*p2; 7 | clrscr(); 8 | x=25; 9 | p=&x; 10 | p2=&p; 11 | printf ("\n x value=%d",x); 12 | printf ("\n address of x=%d",p); 13 | printf ("\n address of p=%d",p2); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /S90.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate pointer variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x,p,*P,**p2; 7 | clrscr(); 8 | x=25; 9 | p=&x; 10 | p2=&p; 11 | printf ("\n x value=%d",x); 12 | printf ("\n p value=%d",p); 13 | printf ("\n p2 value=%d",p2); 14 | printf ("\n *p value=%d",*P); 15 | printf ("\n *p2 value=%d",*p2); 16 | printf ("\n **p2 value=%d",**p2); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /S91.C: -------------------------------------------------------------------------------- 1 | /*prg to swap 2 variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x,y,*P1,*p2,temp; 7 | clrscr(); 8 | p1=&x; 9 | p2=&y; 10 | printf ("\n enter 2 value"); 11 | scanf ("%d%d",&x,&y); 12 | temp=*p1; 13 | *p1=*p2; 14 | *p2=temp; 15 | printf ("\n x=d \t y=%d",x,y); 16 | getch(); 17 | } 18 | -------------------------------------------------------------------------------- /S92.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate pointer variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int *p; 7 | clrscr(); 8 | p=0*000010000; 9 | printf ("\n %x",p); 10 | printf ("\n %x",p+1); 11 | printf ("\n %x",p+2); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /S93.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate pointer variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | float *p; 7 | clrscr(); 8 | p=0*1000; 9 | printf ("\n %x",p); 10 | printf ("\n %x",p+1); 11 | printf ("\n %x",p+2); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /S94.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate pointer variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a[5],i; 7 | clrscr(); 8 | printf ("\n enter 5 number"); 9 | for (i=0;i<=4;i++); 10 | { 11 | scanf ("%d",&a[i]); 12 | } 13 | printf ("\n entered value"); 14 | for (i=0;i<=4;i++) 15 | { 16 | printf ("\n %d\t%d\t%d\t%d",a[i],i[a],*(a+i),*(i+a)); 17 | } 18 | getch(); 19 | } -------------------------------------------------------------------------------- /S95.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate pointer variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x,y,z,*p1,*p2,*p3; 7 | clrscr(); 8 | p1=&x; 9 | p2=&y; 10 | p3=&z; 11 | *p1=10; 12 | *p2=20; 13 | *p3=(*p1)+(*p2); 14 | printf ("\n sum=%d",*p3); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /S98.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate continuos statement in a for loop*/ 2 | #include 3 | void main() 4 | { 5 | int count,limit; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&limit); 9 | for (count=1;count<=limit;count++) 10 | { 11 | printf("\n %d",count); 12 | continue; 13 | 14 | } 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /S99.BAK: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate continue keyword*/ 2 | #include 3 | void main() 4 | { 5 | int count,limit; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&limit); 9 | for (count=1;count<=limit;count++) 10 | { 11 | printf("\n %d",count); 12 | continue; 13 | break; 14 | } 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /S99.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate continue keyword*/ 2 | #include 3 | void main() 4 | { 5 | int count,limit; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&limit); 9 | for (count=1;count<=limit;count++) 10 | { 11 | printf("\n %d",count); 12 | continue; 13 | } 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /SHH.BAK: -------------------------------------------------------------------------------- 1 | /* pgm to find sum of 2 nums*/ 2 | #include 3 | #include 4 | int sum; 5 | void main() 6 | { 7 | int a,b; 8 | clrscr(); 9 | printf ("\n enter 2 nums "); 10 | scanf("%d%d",&a,&b); 11 | sum=a+b; 12 | printf("\n sum of 2 num =%d",sum); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /SHH.C: -------------------------------------------------------------------------------- 1 | /* pgm to check whether the given yr is leap year or not using conditional operator*/ 2 | 3 | #include 4 | #include 5 | void main() 6 | { 7 | int yr; 8 | clrscr(); 9 | printf ("\n enter any year "); 10 | scanf("%d",&yr); 11 | (yr%4==0)?printf("\n leap year");printf("\n not leap year"); 12 | getch(); 13 | } 14 | -------------------------------------------------------------------------------- /SHHHHH.C: -------------------------------------------------------------------------------- 1 | /*pgm to swap two num using dummy variables*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int temp,a,b; 7 | clrscr(); 8 | printf("\n enter two numbers"); 9 | scanf("%d%d",&a,&b); 10 | temp=a; 11 | a=b; 12 | b=temp; 13 | printf("\n after swapping a=%d \t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SHR.C: -------------------------------------------------------------------------------- 1 | /*pgm to print simple message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("/n WELCOME TO C PROGRAMMING"); 8 | getch(); 9 | } 10 | -------------------------------------------------------------------------------- /SI.BAK: -------------------------------------------------------------------------------- 1 | //calculate simple interest 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float p,t,r,si; 9 | clrscr(); 10 | cout<<"\n\tenter values for p t r"; 11 | cin>>p>>t>>r; 12 | si=(p*t*r)/100; 13 | cout<<"\n\tprinciple amt="< 4 | #include 5 | 6 | void main() 7 | { 8 | float p,t,r,si; 9 | clrscr(); 10 | cout<<"\n\tenter values for p t r"; 11 | cin>>p>>t>>r; 12 | si=(p*t*r)/100; 13 | cout<<"\n\tprinciple amt="<>age; 12 | if(age>=18) 13 | { 14 | cout<<"person is eligible to VOTE"; 15 | } 16 | getch(); 17 | } -------------------------------------------------------------------------------- /SI1.CPP: -------------------------------------------------------------------------------- 1 | //ILLUSTRATE SIMPLE IF 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int age; 9 | clrscr(); 10 | cout<<"\n\tenter age "; 11 | cin>>age; 12 | if(age>=18) 13 | { 14 | cout<<"person is eligible to VOTE"; 15 | } 16 | getch(); 17 | } -------------------------------------------------------------------------------- /SIF.BAK: -------------------------------------------------------------------------------- 1 | //program to find area of circle only if radious is less than 5 -------------------------------------------------------------------------------- /SIF.C: -------------------------------------------------------------------------------- 1 | //program to find area of circle only if radious is less than 5 2 | 3 | #include 4 | #include 5 | #define pi 3.142 6 | 7 | void main() 8 | { 9 | float r,area; 10 | clrscr(); 11 | printf("\n\tenter rad of circle"); 12 | scanf("%f",&r); 13 | if(r<5) 14 | { 15 | area=pi*r*r; 16 | printf("\n\tarea of circle=%f",area); 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /SIF.CPP: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | float r,area; 7 | clrscr(); 8 | cout<<"\n\tenter radious of the circle"; 9 | cin>>r; 10 | if(r<5) 11 | { 12 | area=3.142*r*r; 13 | cout< 3 | #include 4 | void main() 5 | { 6 | int age; 7 | clrscr(); 8 | printf("\nenter age of the person"); 9 | scanf("%d",&age); 10 | if(age>=18) 11 | { 12 | printf("eligible to VOTE"); 13 | } 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SIF2.BAK: -------------------------------------------------------------------------------- 1 | //illustrate simple if 2 | #include 3 | #include 4 | void main() 5 | { 6 | int marks; 7 | clrscr(); 8 | printf("\n\tenter marks of the student"); 9 | scanf("%d",&marks); 10 | if(marks>=35) 11 | { 12 | printf("\n\tPASS"); 13 | } 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /SIF2.C: -------------------------------------------------------------------------------- 1 | //illustrate simple if 2 | #include 3 | #include 4 | void main() 5 | { 6 | int marks; 7 | clrscr(); 8 | printf("\n\tenter marks of the student"); 9 | scanf("%d",&marks); 10 | if(marks>=35) 11 | { 12 | printf("\n\tPASS"); 13 | } 14 | 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /SIF3.C: -------------------------------------------------------------------------------- 1 | //program to find area of circle if radious is less than 5 2 | #include 3 | #include 4 | void main() 5 | { 6 | float r,area; 7 | clrscr(); 8 | printf("\nenter radious of the circle"); 9 | scanf("%f",&r); 10 | if(r<5) 11 | { 12 | area=3.142*r*r; 13 | printf("\n\trad=%f\n\tarea of circle=%f",r,area); 14 | } 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /SIF9.C: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include 4 | #include 5 | 6 | 7 | void main() 8 | { 9 | int a,b,c,x,y; 10 | clrscr(); 11 | printf("\n\tenter values for a,b,c,x"); 12 | scanf("%d%d%d%d",&a,&b,&c,&x); 13 | if(x<5) 14 | { 15 | y=a*x*x+b*x+c; 16 | printf("\n\tresult of expression=%d",y); 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /SIMIF4.BAK: -------------------------------------------------------------------------------- 1 | /* Program to calculate area of circle only if r is less than 5*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float r,area; 8 | clrscr(); 9 | printf("\n\tenter value for r"); 10 | scanf("%f",&r); 11 | if(r<5) 12 | { 13 | area=3.142*r*r; 14 | printf("\n\tr=%f\n\tarea=%f",r,area); 15 | } 16 | getch(); 17 | } -------------------------------------------------------------------------------- /SIMIF4.C: -------------------------------------------------------------------------------- 1 | /* Program to calculate area of circle only if radious is less than 5*/ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float r,area; 8 | clrscr(); 9 | printf("\n\tenter value for r"); 10 | scanf("%f",&r); 11 | if(r<5) 12 | { 13 | area=3.142*r*r; 14 | printf("\n\tr=%f\n\tarea=%f",r,area); 15 | } 16 | getch(); 17 | } -------------------------------------------------------------------------------- /SIMPLE1.BAK: -------------------------------------------------------------------------------- 1 | /*prg to print below message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n ktc\\hbl\\101 "); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /SIMPLE1.C: -------------------------------------------------------------------------------- 1 | /*prg to print below message*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int _a=10; 7 | clrscr(); 8 | 9 | printf("\n ktc\\hbl\\101 a=%d ",_a); 10 | getch(); 11 | } -------------------------------------------------------------------------------- /SIMPLEIF.C: -------------------------------------------------------------------------------- 1 | //illustrate simple if 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int marks; 9 | clrscr(); 10 | cout<<"\nenter marks of student"; 11 | cin>>marks; 12 | if(marks>=35) 13 | cout<<"\n\tPASS"; 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /SIMPLE_I.BAK: -------------------------------------------------------------------------------- 1 | /*program to check whether 2 | the person is eligible to vote or not*/ 3 | #include 4 | #include 5 | void main() 6 | { 7 | int age; 8 | clrscr(); 9 | printf("\nenter age of the person"); 10 | scanf("%d",&age); 11 | if(age>=18) 12 | { 13 | printf("eligible to VOTE"); 14 | } 15 | 16 | getch(); 17 | } 18 | -------------------------------------------------------------------------------- /SIMPLE_I.C: -------------------------------------------------------------------------------- 1 | /*program to check whether 2 | the person is eligible to vote (simple if)*/ 3 | #include 4 | #include 5 | void main() 6 | { 7 | int age; 8 | clrscr(); 9 | printf("\nenter age of the person"); 10 | scanf("%d",&age); 11 | if(age>=18) 12 | { 13 | printf("eligible to VOTE"); 14 | } 15 | 16 | getch(); 17 | } 18 | -------------------------------------------------------------------------------- /SIMPLE_I.CPP: -------------------------------------------------------------------------------- 1 | //program to ilustrate simple if 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int age; 9 | clrscr(); 10 | cout<<"\n\tenter age of the person"; 11 | cin>>age; 12 | if(age>=18) 13 | cout<<"\n\tperson is eligible to vote"; 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /SIMP_IF2.BAK: -------------------------------------------------------------------------------- 1 | //program to check whether the student is PASS or FAIL in the subject 2 | //illustration of simple if 3 | 4 | #include 5 | #include 6 | 7 | void main() 8 | { 9 | int marks; 10 | clrscr(); 11 | printf("\n\tenter marks of student"); 12 | scanf("%d",&marks); 13 | if(marks>=35) 14 | printf("\n\tPASS"); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /SIMP_IF2.C: -------------------------------------------------------------------------------- 1 | //program to check whether the student is PASS in the subject 2 | //illustration of simple if 3 | 4 | #include 5 | #include 6 | 7 | void main() 8 | { 9 | int marks; 10 | clrscr(); 11 | printf("\n\tenter marks of student"); 12 | scanf("%d",&marks); 13 | if(marks>=35) 14 | printf("\n\tPASS"); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /SIM_IF.C: -------------------------------------------------------------------------------- 1 | //illustrate simple if 2 | #include 3 | #include 4 | void main() 5 | { 6 | int age; 7 | clrscr(); 8 | printf("\nenter age of the person"); 9 | scanf("%d",&age); 10 | if(age>=18) 11 | { 12 | printf("eligible to VOTE"); 13 | } 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SIZEOF.BAK: -------------------------------------------------------------------------------- 1 | //program to illustrate size of operator 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a; 9 | float b; 10 | char c; 11 | clrscr(); 12 | cout<<"\n\tsize of int"< 2 | #include 3 | 4 | void main() 5 | { 6 | int a,b,c,smallest; 7 | clrscr(); 8 | printf("Enter any three numbers to find smallest of all\n"); 9 | scanf("%d%d%d",&a,&b,&c); 10 | smallest=(a 2 | #include 3 | 4 | void smallest(int ,int ); 5 | int a,b,s; 6 | 7 | void main() 8 | { 9 | clrscr(); 10 | cout<<"\n\tenter 2 integers"; 11 | cin>>a>>b; 12 | smallest(a,b); 13 | getch(); 14 | } 15 | 16 | void smallest(int p,int q) 17 | { 18 | s=p 2 | #include 3 | 4 | void smallest(int ,int ); 5 | int a,b,s; 6 | 7 | void main() 8 | { 9 | clrscr(); 10 | cout<<"\n\tenter 2 integers"; 11 | cin>>a>>b; 12 | smallest(a,b); 13 | getch(); 14 | } 15 | 16 | void smallest(int p,int q) 17 | { 18 | s=p 3 | #include 4 | void main() 5 | { 6 | float area,r,pi=3.142; 7 | clrscr(); 8 | printf("\n Enter radius"); 9 | scanf("%f",&r); 10 | area=pi*r*r; 11 | printf("\n Area of a circle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /SN11.C: -------------------------------------------------------------------------------- 1 | //prg to find area of a rectangle 2 | #include 3 | #include 4 | void main() 5 | { 6 | float area,l,b; 7 | clrscr(); 8 | printf("\n Enter length and breadth"); 9 | scanf("%f%f",&l,&b); 10 | area=l*b; 11 | printf("\n Area of a rectangle=%f",area); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /SN12.C: -------------------------------------------------------------------------------- 1 | 2 | //prg to find area of a traingle 3 | #include 4 | #include 5 | void main() 6 | { 7 | float area,h,b; 8 | clrscr(); 9 | printf("\n Enter base and height"); 10 | scanf("%f%f",&b,&h); 11 | area=0.5*b*h; 12 | printf("\n Area of a traingle=%f",area); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /SN13.C: -------------------------------------------------------------------------------- 1 | //prg to find area of a traingle when 3 side are given 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | float area,a,b,c,s; 8 | clrscr(); 9 | printf("\n Enter 3 sides"); 10 | scanf("%f%f%f",&a,&b,&c); 11 | s=(a+b+c)/2; 12 | area=sqrt(s*(s-a)*(s-b)*(s-c)); 13 | printf("\n Area of a traingle=%f",area); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SN2.C: -------------------------------------------------------------------------------- 1 | //prg to display a simple message 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n all \t the \t best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /SN3.C: -------------------------------------------------------------------------------- 1 | //prg to display a simple message 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | printf("\n all \n the \n best"); 8 | getch(); 9 | } -------------------------------------------------------------------------------- /SN4.C: -------------------------------------------------------------------------------- 1 | //prg to find sum of 2 nums 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,sum; 7 | clrscr(); 8 | printf("\n Enter any 2 nums"); 9 | scanf("%d%d",&a,&b); 10 | sum=a+b; 11 | printf("\n sum=%d",sum); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /SN5.C: -------------------------------------------------------------------------------- 1 | //prg to swap 2 numbers using dummy variable 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,temp; 7 | clrscr(); 8 | printf("\n Enter any 2 nums"); 9 | scanf("%d%d",&a,&b); 10 | temp=a; 11 | a=b; 12 | b=temp; 13 | printf("\n After swapping a=%d \t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SN6.C: -------------------------------------------------------------------------------- 1 | //prg to swap 2 numbers without using dummy variable 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b; 7 | clrscr(); 8 | printf("\n Enter any 2 nums"); 9 | scanf("%d%d",&a,&b); 10 | a=a+b; 11 | b=a-b; 12 | a=a-b; 13 | printf("\n After swapping a=%d \t b=%d",a,b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SN8.C: -------------------------------------------------------------------------------- 1 | //prg to perform basic arithmetic operations 2 | #include 3 | #include 4 | void main() 5 | { 6 | float a,b; 7 | clrscr(); 8 | printf("\n Enter any 2 nums"); 9 | scanf("%f%f",&a,&b); 10 | printf("\n sum=%f",(a+b)); 11 | printf("\n substraction=%f",(a-b)); 12 | printf("\n product=%f",(a*b)); 13 | printf("\n division=%f",(a/b)); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SN9.C: -------------------------------------------------------------------------------- 1 | //prg to find sum and avg of 3 nums 2 | #include 3 | #include 4 | void main() 5 | { 6 | float a,b,c,sum,avg; 7 | clrscr(); 8 | printf("\n Enter any 3 nums"); 9 | scanf("%f%f%f",&a,&b,&c); 10 | sum=(a+b+c); 11 | avg=sum/3; 12 | printf("\n Total=%f",sum); 13 | printf("\n Average=%f",avg); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SQ.BAK: -------------------------------------------------------------------------------- 1 | //program to ffind square and cube of a given number 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int n,sq,cube; 9 | clrscr(); 10 | printf("\n\tenter value for n"); 11 | scanf("%d",&n); 12 | sq=n*n; 13 | cube=n*n*n; 14 | printf("\n\tnumber=%d\n\tsquare=%d\n\tcube=%d",n,sq,cube); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /SQ.C: -------------------------------------------------------------------------------- 1 | //program to find square and cube of a given number 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int n,sq,cube; 9 | clrscr(); 10 | printf("\n\tenter value for n"); 11 | scanf("%d",&n); 12 | sq=n*n; 13 | cube=n*n*n; 14 | printf("\n\tnumber=%d\n\tsquare=%d\n\tcube=%d",n,sq,cube); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /SQCUBE.CPP: -------------------------------------------------------------------------------- 1 | //square and cube of a given number 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int n,sq,cube; 9 | clrscr(); 10 | cout<<"\n\tenter any number"; 11 | cin>>n; 12 | sq=n*n; 13 | cube=n*n*n; 14 | cout<<"\n\tnum="< 4 | #include 5 | 6 | void main() 7 | { 8 | int n,sq,cube; 9 | clrscr(); 10 | printf("\nenter value for n"); 11 | scanf("%d",&n); 12 | sq=n*n; 13 | cube=n*n*n; 14 | printf("\n\tnumber=%d",n); 15 | printf("\n\tsquare=%d",sq); 16 | printf("\n\tcube=%d",cube); 17 | getch(); 18 | } 19 | -------------------------------------------------------------------------------- /SS.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int i=1; 6 | clrscr(); 7 | while(i<=5>) 8 | { 9 | printf("\n \t %d",i); 10 | i++; 11 | } 12 | getch(); 13 | } -------------------------------------------------------------------------------- /SS.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int i=1; 6 | clrscr(); 7 | while(i<=5) 8 | { 9 | printf("\n \t %d",i); 10 | i++; 11 | } 12 | getch(); 13 | } -------------------------------------------------------------------------------- /SS2.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void min() 4 | { 5 | int i=1,n,sum=0; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&n); 9 | while(i<=n) 10 | { 11 | sum=sum+i; 12 | i++; 13 | } 14 | printf("\n sum of 1 to n nums=%d",sum); 15 | getch(); 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /SS2.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int i=1,n,sum=0; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&n); 9 | while(i<=n) 10 | { 11 | sum=sum+i; 12 | i++; 13 | } 14 | printf("\n sum of 1 to n nums=%d",sum); 15 | getch(); 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /SS21.CPP: -------------------------------------------------------------------------------- 1 | // * prg to print nums 1 to 100 2 | #include 3 | #include 4 | void main () 5 | { 6 | int i=1; 7 | clrscr(); 8 | while(i<=10) 9 | { 10 | cout< 2 | #include 3 | void main() 4 | { 5 | int temp,n,d,rev=0; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&n); 9 | temp=n; 10 | while(n>0) 11 | { 12 | d=n%10; 13 | rev=(rev*10)+d; 14 | n=n/10; 15 | } 16 | printf("\n given number=%d",temp); 17 | printf("\n reversed number=%d",rev); 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /SS3.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int temp,n,d,rev=0; 6 | clrscr(); 7 | printf("\n enter the limit"); 8 | scanf("%d",&n); 9 | temp=n; 10 | while(n>0) 11 | { 12 | d=n%10; 13 | rev=(rev*10)+d; 14 | n=n/10; 15 | } 16 | printf("\n given number=%d",temp); 17 | printf("\n reversed number=%d",rev); 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /SS4.C: -------------------------------------------------------------------------------- 1 | //prg to read a string and find the length of a given string 2 | #include 3 | #include 4 | #include 5 | void main () 6 | { 7 | int len=0; 8 | char str[20]; 9 | clrscr(); 10 | printf("\n Enter any string"); 11 | gets(str); 12 | len=strlen(str); 13 | printf("\n length of a given string is %d",len); 14 | 15 | getch(); 16 | } 17 | -------------------------------------------------------------------------------- /SSB.CPP: -------------------------------------------------------------------------------- 1 | //program to find the area and cereumprence of the circele. 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,c; 7 | float area,cereumprence; 8 | printf("enter the value of a and c"); 9 | scanf("%d%d", & a,&c); 10 | area=3.142 * a&c; 11 | cereumprence=2*3.142*c; 12 | printf("are=%f",area); 13 | printf("\ncereumperence=%f",cereumprence) 14 | getch(); 15 | } -------------------------------------------------------------------------------- /SSS.CPP: -------------------------------------------------------------------------------- 1 | //even and odd numbers 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a; 7 | printf("enter the number:"); 8 | scanf("%d",&a); 9 | if(a>0) 10 | printf("%d is +ve",a); 11 | else 12 | printf("%d is -ve",a); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /STAR.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | int r,c; 6 | clrscr(); 7 | for(r=1;r<=3;r++) 8 | { 9 | for(c=1;c<=3;c++) 10 | { 11 | printf("\t *"); 12 | } 13 | printf("\n"); 14 | } 15 | getch(); 16 | } -------------------------------------------------------------------------------- /STARNO.CPP: -------------------------------------------------------------------------------- 1 | /*program to print star with num*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int r,c; 7 | clrscr(); 8 | cout<<"the nos are:\n"; 9 | 10 | for(r=1;r<=3;r++) 11 | { 12 | for(c=1;c<=3;c++) 13 | { 14 | cout< 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char address[40]; 9 | clrscr(); 10 | printf("\nillustration of gets and puts\n"); 11 | printf("\tenter line of text\n\t"); 12 | gets(address); 13 | printf("\naddress is\n\t\t"); 14 | puts(address); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /STR1.C: -------------------------------------------------------------------------------- 1 | //illustrate gets and puts functions 2 | #include 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char address[40]; 9 | clrscr(); 10 | printf("\nillustration of gets and puts\n"); 11 | printf("\tenter line of text\n\t"); 12 | gets(address); 13 | printf("\naddress is\n\t\t"); 14 | puts(address); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /STR1.CPP: -------------------------------------------------------------------------------- 1 | /*program to read a string and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | char str1[20]; 7 | clrscr(); 8 | cout<<"enter any string"; 9 | cin>>str1; 10 | cout<<"entered string is"< 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char name[40]; 9 | clrscr(); 10 | printf("\nillustration of string\n"); 11 | printf("\tenter your name\n\t"); 12 | scanf("%s",name); 13 | printf("\n\tname=%s",name); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STR2.C: -------------------------------------------------------------------------------- 1 | //illustrate string input output with printf and scanf function 2 | #include 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char name[40]; 9 | clrscr(); 10 | printf("\nillustration of string scanf function\n"); 11 | printf("\tenter your name\n\t"); 12 | scanf("%s",name); 13 | printf("\n\tname=%s",name); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STR2.CPP: -------------------------------------------------------------------------------- 1 | /*program to read a string and print the same*/ 2 | #include 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | cout<<"enter any string"; 10 | gets(str1); 11 | cout<<"entered string is"< 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char x; 9 | clrscr(); 10 | printf("\nenter any character"); 11 | x=getchar(); 12 | printf("\n\tentered character is="); 13 | putchar(x); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STR3.C: -------------------------------------------------------------------------------- 1 | //illustrate getchar and putchar functions 2 | #include 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char x; 9 | clrscr(); 10 | printf("\nenter any character"); 11 | x=getchar(); 12 | printf("\n\tentered character is="); 13 | putchar(x); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STR3.CPP: -------------------------------------------------------------------------------- 1 | /*program to find length of a string*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i,len=0; 7 | char str1[20]; 8 | clrscr(); 9 | cout<<"enter any string"; 10 | cin>>str1; 11 | for(i=0;str1[i]!='\0';i++) 12 | { 13 | len=len+1; 14 | } 15 | cout<<"length of a given string is: "< 4 | #include 5 | #include 6 | void main() 7 | { 8 | char str1[20]; 9 | clrscr(); 10 | cout<<"Enter any string"; 11 | cin>>str1; 12 | strcpy(str2,str1); 13 | cout<<"\n Given string is: "< 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20]; 8 | clrscr(); 9 | cout<<"Enter any string"; 10 | cin>>str1; 11 | cout<<"\n Given string is: "< 3 | #include 4 | #include 5 | void main() 6 | { 7 | char str1[20],str2[20]; 8 | clrscr(); 9 | cout<<"Enter first string"; 10 | cin>>str1; 11 | cout<<"Enter second string"; 12 | cin>>str2; 13 | 14 | strcat(str1,str2); 15 | cout<<"\n concatenated string is: "< 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | if(strcmp(s1,s2)==0) 13 | printf("\n\tSTRINGS ARE EQUAL"); 14 | else 15 | printf("\n\tSTRINGS ARE NOT EQUAL"); 16 | getch(); 17 | } 18 | -------------------------------------------------------------------------------- /STRING1.CPP: -------------------------------------------------------------------------------- 1 | //program to illlustrate strings 2 | #include 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char name[20],add[20]; 9 | clrscr(); 10 | printf("\n\tenter name and address"); 11 | scanf("%s%s",name,add); 12 | printf("\n\tname=%s\n\taddress=%s",name,add); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /STRING3.BAK: -------------------------------------------------------------------------------- 1 | //program to combine two strings(illustrate strcat()) 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | strcat(s1,s2); 13 | printf("\n\tCONCATENATED STRING IS=%s",s1); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /STRING3.C: -------------------------------------------------------------------------------- 1 | //program to combine two strings(illustrate strcat()) 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | strcat(s1,s2); 13 | printf("\n\tCONCATENATED STRING IS=%s",s1); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /STRING4.BAK: -------------------------------------------------------------------------------- 1 | //illustrate strncat() function 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | strncat(s1,s2,4); 13 | printf("\n\tCONCATENATED STING IS=%s",s1); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STRING4.C: -------------------------------------------------------------------------------- 1 | //illustrate strncat() function 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | strncat(s1,s2,4); 13 | printf("\n\tCONCATENATED STRING IS=%s",s1); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STRING5.BAK: -------------------------------------------------------------------------------- 1 | //illustrate strcpy() function 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s",s1); 12 | strcpy(s2,s1); 13 | printf("\n\tCOPIED STRING IS=%s",s2); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STRING5.C: -------------------------------------------------------------------------------- 1 | //illustrate strcpy() function 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s",s1); 12 | strcpy(s2,s1); 13 | printf("\n\tCOPIED STRING IS=%s",s2); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STRING6.BAK: -------------------------------------------------------------------------------- 1 | // PROGRAM to illustrate strncpy() function 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | strncpy(s1,s2,3); 13 | printf("\n\tCOPIED STRING IS=%s",s1); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STRING6.C: -------------------------------------------------------------------------------- 1 | // PROGRAM to illustrate strncpy() function 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | void main() 8 | { 9 | char s1[20],s2[20]; 10 | clrscr(); 11 | printf("\nenter 2 strings"); 12 | scanf("%s%s",s1,s2); 13 | strncpy(s1,s2,3); 14 | printf("\n\tCOPIED STRING IS=%s",s1); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /STRING7.BAK: -------------------------------------------------------------------------------- 1 | //program to find length of a give string(illustrate strlen() function) 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20]; 9 | clrscr(); 10 | printf("\nenter any string"); 11 | scanf("%s",s1); 12 | printf("\n\tLENGTH OF GIVEN STRING %s IS=%d",s1,strlen(s1)); 13 | getch(); 14 | } -------------------------------------------------------------------------------- /STRING7.C: -------------------------------------------------------------------------------- 1 | //program to find length of a give string(illustrate strlen() function) 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | void main() 8 | { 9 | char s1[20]; 10 | clrscr(); 11 | printf("\nenter any string"); 12 | scanf("%s",s1); 13 | printf("\n\tLENGTH OF GIVEN STRING %s IS=%d",s1,strlen(s1)); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /STRLEN.CPP: -------------------------------------------------------------------------------- 1 | /*program to find length of a string*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i,len=0; 7 | char str1[20]; 8 | clrscr(); 9 | cout<<"enter any string"; 10 | cin>>str1; 11 | for(i=0;str1[i]!='\0';i++) 12 | { 13 | len=len+1; 14 | } 15 | cout<<"length of a given string is: "< 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | printf("\n\tstring1=%s",s1); 13 | printf("\n\tstring21=%s",s2); 14 | strcpy(s1,s2); 15 | printf("\n\tcopied string=%s",s1); 16 | getch(); 17 | } -------------------------------------------------------------------------------- /STR_EQUA.C: -------------------------------------------------------------------------------- 1 | //strcpy function 2 | #include 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | char s1[20],s2[20]; 9 | clrscr(); 10 | printf("\nenter 2 strings"); 11 | scanf("%s%s",s1,s2); 12 | printf("\n\tstring1=%s",s1); 13 | printf("\n\tstring2=%s",s2); 14 | strncpy(s1,s2,4); 15 | printf("\n\tcopied string=%s",s1); 16 | getch(); 17 | } -------------------------------------------------------------------------------- /STUD1.C: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/STUD1.C -------------------------------------------------------------------------------- /SUDHA00.CPP: -------------------------------------------------------------------------------- 1 | //program to find simple interest. 2 | #include 3 | #include 4 | void main() 5 | { 6 | int p,t; 7 | float r,si; 8 | clrscr(); 9 | printf("\n enter the value of p,t and r:"); 10 | scanf("%d%d%f",&p,&t,&r); 11 | si=(p*t*r)/100; 12 | printf("\n simple interest:=%f",si); 13 | getch(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /SUM.BAK: -------------------------------------------------------------------------------- 1 | //program to find SUM OF 2 NUMBERS 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int a,b,sum; 8 | clrscr(); 9 | cout<<"\n\tenter 2 integers"; 10 | cin>>a>>b; 11 | sum=a+b; 12 | cout<<"\n\ta="< 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | int a=5,b=50,sum=0; 8 | sum=a+b; 9 | /*printf("\nsum of two numbers:=%d"); */ 10 | printf("\nA value is:=%d",a); 11 | printf("\nB value is:=%d",b); 12 | printf("\nsum of A And B:=%d",sum); 13 | getch(); 14 | } 15 | -------------------------------------------------------------------------------- /SUMAR.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int a[3],i,*p; 7 | clrscr(); 8 | printf("Enter 3 array elements\n"); 9 | for(i=0;i<3;i++) 10 | { 11 | scanf("%d",&a[i]); 12 | } 13 | 14 | p=a; 15 | for(i=0;i<=3;i++) 16 | { 17 | *p=a[0]+a[1]+a[2]; 18 | printf("sum is %d",*p); 19 | } 20 | getch(); 21 | } -------------------------------------------------------------------------------- /SUMAVG.C: -------------------------------------------------------------------------------- 1 | //program to find sum and average of 3 numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float a,b,c,sum,avg; 9 | clrscr(); 10 | printf("\n\tenter values for a b c"); 11 | scanf("%f%f%f",&a,&b,&c); 12 | sum=a+b+c; 13 | avg=sum/3; 14 | printf("\n\ta=%f\n\tb=%f\n\tc=%f\n\tsum=%f\n\taverage=%f",a,b,c,sum,avg); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /SUMAVG.CPP: -------------------------------------------------------------------------------- 1 | //program to fid sum and average of 3 numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int a,b,c,sum,avg; 9 | clrscr(); 10 | cout<<"\n\tenter 3 integers"; 11 | cin>>a>>b>>c; 12 | sum=a+b+c; 13 | avg=sum/3; 14 | cout<<"\n\ta="<>a[i]; 12 | } 13 | cout<<"\ entered 5 nums are \n"; 14 | for(i=4;i>=0;i--) 15 | { 16 | cout<<"\n"< 3 | #include 4 | int sum(int,int); 5 | void main() 6 | { 7 | int a,b,s; 8 | clrscr(); 9 | cout<<"\n enter any 2 nums"; 10 | cin>>a>>b; 11 | s=sum(a,b); 12 | cout<<"\n sum of 2 nums="< 2 | #include 3 | int swap(int x,int y); 4 | void main() -------------------------------------------------------------------------------- /T1.BAK: -------------------------------------------------------------------------------- 1 | //program to find sum and average of 3 numbers 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | float a,b,c,sum,avg; 9 | clrscr(); 10 | cout<>a>>b>>c; 12 | sum=a+b+c; 13 | avg=sum/3; 14 | cout<<"\n\ta="< 4 | #include 5 | 6 | void main() 7 | { 8 | float a,b,c,sum,avg; 9 | clrscr(); 10 | cout<>a>>b>>c; 12 | sum=a+b+c; 13 | avg=sum/3; 14 | cout<<"\n\ta="<>r; 12 | area=3.142*r*r; 13 | cir=2*3.142*r; 14 | cout<<"\n\trad="< 4 | #include 5 | void main() 6 | { 7 | int x,y,*p1,*p2,temp; 8 | clrscr(); 9 | p1=&x; 10 | p2=&y; 11 | printf("\n enter 2 values"); 12 | scanf("%d%d",&x,&y); 13 | temp=*p1; 14 | *p1=*p2; 15 | *p2=temp; 16 | printf("\n x=%d\t y=%d",x,y); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /T3.C: -------------------------------------------------------------------------------- 1 | 2 | //prg to swap two variables 3 | #include 4 | #include 5 | void main() 6 | { 7 | int x,y,*p1,*p2,temp; 8 | clrscr(); 9 | p1=&x; 10 | p2=&y; 11 | printf("\n enter 2 values"); 12 | scanf("%d%d",&x,&y); 13 | temp=*p1; 14 | *p1=*p2; 15 | *p2=temp; 16 | printf("\n x=%d\t y=%d",x,y); 17 | printf("\n x=%d\t y=%d",*p1,*p2); 18 | getch(); 19 | } -------------------------------------------------------------------------------- /T4.BAK: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int *p; 6 | clrscr(); 7 | p=0x00001010; 8 | printf("\n %X",p); 9 | printf("\n %X",p+1); 10 | printf("\n %X",p+2); 11 | getch(); 12 | 13 | } -------------------------------------------------------------------------------- /T4.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | int *p; 6 | clrscr(); 7 | p=0x00001010; 8 | printf("\n %X",p); 9 | printf("\n %X",p+1); 10 | printf("\n %X",p+2); 11 | getch(); 12 | 13 | } -------------------------------------------------------------------------------- /T5.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | float *p; 6 | p=0X1000; 7 | clrscr(); 8 | printf("\n %X",p); 9 | printf("\n %X",p+1); 10 | printf("\n %X",p+2); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /T7.BAK: -------------------------------------------------------------------------------- 1 | //prg to find sum of 2 nums using pointer variables 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x,y,z,*p1,*p2,*p3; 7 | clrscr(); 8 | p1=&x; 9 | p2=&y; 10 | p3=&z; 11 | *p1=10; 12 | *p2=20; 13 | *p3=(*p1)+(*p2); 14 | printf("\n sum=%d",*p3); 15 | getch(); 16 | 17 | } -------------------------------------------------------------------------------- /T7.C: -------------------------------------------------------------------------------- 1 | //prg to find sum of 2 nums using pointer variables 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x,y,z,*p1,*p2,*p3; 7 | clrscr(); 8 | p1=&x; 9 | p2=&y; 10 | p3=&z; 11 | *p1=10; 12 | *p2=20; 13 | *p3=(*p1)+(*p2); 14 | printf("\n sum=%d",*p3); 15 | printf("\n sum =%d",z); 16 | getch(); 17 | 18 | } -------------------------------------------------------------------------------- /T8.C: -------------------------------------------------------------------------------- 1 | /*prg to demonstrate address of the variables*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int x=25,y; 7 | y=&x; 8 | clrscr(); 9 | 10 | printf("\n x value=%d",x); 11 | printf("\n Address of x=%d",y); 12 | printf("\n Address of y=%d",&y); 13 | getch(); 14 | 15 | 16 | } -------------------------------------------------------------------------------- /TABLE.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | int main() 4 | { 5 | int i,n; 6 | clrscr(); 7 | printf("\n enter any number"); 8 | scanf("%d",&n); 9 | 10 | for(i=1;i<=10;i++) 11 | { 12 | printf("\n %d * %d=%d",n,i,n*i); 13 | } 14 | getch(); 15 | } -------------------------------------------------------------------------------- /THELP.CFG: -------------------------------------------------------------------------------- 1 | /fC:\TC\BIN\TCHELP.TCH -------------------------------------------------------------------------------- /THELP.COM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/THELP.COM -------------------------------------------------------------------------------- /TIME.BAK: -------------------------------------------------------------------------------- 1 | /*prg to print Hello message 5 times using for loop */ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int i,time; 8 | clrscr(); 9 | cout<<"\n\thow many time you want to display your name"; 10 | cin>>time; 11 | for(i=1;i<=time;i++) 12 | { 13 | cout<<"\n keonics"; 14 | } 15 | getch(); 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /TIME.CPP: -------------------------------------------------------------------------------- 1 | /*prg to print Hello message 5 times using for loop */ 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | int i,time; 8 | clrscr(); 9 | cout<<"\n\thow many time you want to display your name"; 10 | cin>>time; 11 | for(i=1;i<=time;i++) 12 | { 13 | cout<<"\n keonics"; 14 | } 15 | getch(); 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /TLIB.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/TLIB.EXE -------------------------------------------------------------------------------- /TLINK.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/TLINK.EXE -------------------------------------------------------------------------------- /TOUCH.COM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/TOUCH.COM -------------------------------------------------------------------------------- /TRANCOPY.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/TRANCOPY.EXE -------------------------------------------------------------------------------- /TRI.BAK: -------------------------------------------------------------------------------- 1 | //area of triangle 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float b,h,area; 8 | clrscr(); 9 | cout<<"\n\tenter base anf height of triangle"; 10 | cin>>b>>h; 11 | area=0.5*b*h; 12 | cout<<"\n\tbase="< 4 | #include 5 | 6 | void main() 7 | { 8 | float area,b,h; 9 | clrscr(); 10 | printf("\nenter values for base and height"); 11 | scanf("%f%f",&b,&h); 12 | area=0.5*b*h; 13 | printf("\n\tbase=%f\n\theight=%f\narea of triangle=%f",b,h,area); 14 | getch(); 15 | } 16 | -------------------------------------------------------------------------------- /TRI.CPP: -------------------------------------------------------------------------------- 1 | //area of triangle 2 | #include 3 | #include 4 | 5 | void main() 6 | { 7 | float b,h,area; 8 | clrscr(); 9 | cout<<"\n\tenter base anf height of triangle"; 10 | cin>>b>>h; 11 | area=0.5*b*h; 12 | cout<<"\n\tbase="< 4 | #include 5 | 6 | void triangle(); 7 | float b,h,area; 8 | void main() 9 | { 10 | clrscr(); 11 | triangle(); 12 | getch(); 13 | } 14 | void triangle() 15 | { 16 | printf("\nenter base and height of triangle"); 17 | area=0.5*b*h; 18 | printf("\n\tarea of triangle=%f",area); 19 | } -------------------------------------------------------------------------------- /TRIFUN.CPP: -------------------------------------------------------------------------------- 1 | //area oftriangle using function 2 | 3 | #include 4 | #include 5 | 6 | void triangle(); 7 | float b,h,area; 8 | void main() 9 | { 10 | clrscr(); 11 | triangle(); 12 | getch(); 13 | } 14 | void triangle() 15 | { 16 | printf("\nenter base and height of triangle"); 17 | scanf("%f%f",&b,&h); 18 | area=0.5*b*h; 19 | printf("\n\tarea of triangle=%f",area); 20 | } -------------------------------------------------------------------------------- /TRIGRAPH.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/TRIGRAPH.EXE -------------------------------------------------------------------------------- /TURBOC.CFG: -------------------------------------------------------------------------------- 1 | -IC:\TC\INCLUDE 2 | -LC:\TC\LIB 3 | -------------------------------------------------------------------------------- /TYPE_CAS.BAK: -------------------------------------------------------------------------------- 1 | //program illustrate type casting(implicit) 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a=7,b=3; 7 | float q; 8 | clrscr(); 9 | q=a/b; 10 | cout<<"\n\ta="< 3 | #include 4 | void main() 5 | { 6 | int a=7,b=3; 7 | float q; 8 | clrscr(); 9 | q=a/b; 10 | cout<<"\n\ta="< 3 | #include 4 | void main() 5 | { 6 | int a=7,b=3; 7 | float q; 8 | clrscr(); 9 | q=(float)a/(float)b; 10 | cout<<"\n\ta="< 3 | #include 4 | void main() 5 | { 6 | int a=7,b=3; 7 | float q; 8 | clrscr(); 9 | q=(float)a/(float)b; 10 | cout<<"\n\ta="< 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | cout<<"all"< 3 | #include 4 | void main() 5 | { 6 | int i=10, j=20; 7 | clrscr(); 8 | cout<<"\n value of i"< 3 | #include 4 | void main() 5 | { 6 | int i=30, j=20; 7 | clrscr(); 8 | if(i>j) 9 | cout<<"\n i is big"; 10 | if(i 3 | #include 4 | void main() 5 | { 6 | int n; 7 | clrscr(); 8 | cout<<"\n enter any no"; 9 | cin>>n; 10 | if(n>0) 11 | cout<<"\n +ve no"; 12 | if(n<0) 13 | cout<<"\n -neg no"; 14 | getch(); 15 | } -------------------------------------------------------------------------------- /V15.CPP: -------------------------------------------------------------------------------- 1 | /* prg to check whether given no is even or odd using if else */ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int n; 7 | clrscr(); 8 | cout<<"\n enter any no"; 9 | cin>>n; 10 | if(n%2==0) 11 | cout<<"\n even no"; 12 | else 13 | cout<<"\n odd no"; 14 | getch(); 15 | } -------------------------------------------------------------------------------- /V2.CPP: -------------------------------------------------------------------------------- 1 | // prg to perform basic airthematic operator 2 | #include 3 | #include 4 | void main() 5 | { 6 | float a,b; 7 | clrscr(); 8 | cout<<"enter two numbers"; 9 | cin>>a>>b; 10 | cout<<"\n sum="<<(a+b); 11 | cout<<"\n sub="<<(a-b); 12 | cout<<"\n product="<<(a*b); 13 | cout<<"\n division="<<(a/b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /V29.CPP: -------------------------------------------------------------------------------- 1 | /* prg to read a no and find factorial of a givrn number*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=1, fact=1,n; 7 | clrscr(); 8 | cout<<"\n enter any no"; 9 | cin>>n; 10 | while(i<=n) 11 | { 12 | fact=fact*i; 13 | i++; 14 | } 15 | cout<<"factorial of a given no="< 3 | #include 4 | #define pi 3.142 5 | void main() 6 | { 7 | float ar,r; 8 | clrscr(); 9 | cout<<"enter radius"; 10 | cin>>r; 11 | ar=pi*r*r; 12 | cout<<"\n area of a circle="< 2 | #include 3 | inline float simple(long int p,int t,float r) 4 | { 5 | return((p*t*r)/100); 6 | } 7 | void main() 8 | { 9 | clrscr(); 10 | cout<<"simple interest="< 2 | #include 3 | inline float simple(long int p,int t,float r) 4 | { 5 | return((p*t*r)/100); 6 | } 7 | void main() 8 | { 9 | clrscr(); 10 | cout<<"simple interest="< 2 | #include 3 | class construct 4 | { 5 | private: 6 | int a,b,sum; 7 | public: 8 | construct (){} 9 | construct(int p,int q) 10 | { 11 | a=p; 12 | b=q; 13 | } 14 | int calc() 15 | { 16 | return(a+b); 17 | } 18 | }; 19 | void main() 20 | { 21 | construct c(4,5); 22 | clrscr(); 23 | c.calc(); 24 | cout<<"sum="< 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,c; 7 | float s, area; -------------------------------------------------------------------------------- /VIJAY1.CPP: -------------------------------------------------------------------------------- 1 | /* to find sum of 2 numbers*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,sum; 7 | clrscr(); 8 | printf("\n enter 2 numbers"); 9 | scanf("%d%d",&a,&b); 10 | sum=a+b; 11 | printf("\n sum of 2 numbers=%d",sum); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /VIJAY10.CPP: -------------------------------------------------------------------------------- 1 | /* programme to find smallest of two nums using conditional operttor*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,res; 7 | clrscr(); 8 | printf("\n enter any 2 numbers"); 9 | scanf("%d%d",&a,&b); 10 | res=(a 3 | #include 4 | void main() 5 | { 6 | int a,b,res; 7 | clrscr(); 8 | printf("\n enter any 2 numbers"); 9 | scanf("%d%d",&a,&b); 10 | res=(a 3 | #include 4 | void mian() 5 | { 6 | int n; 7 | printf("\n enter any number"); 8 | scanf("%d",&n); 9 | printf("\neven no");printf("\nodd no"); 10 | (n%2==0) 11 | getch(); 12 | } -------------------------------------------------------------------------------- /VIJAY13.CPP: -------------------------------------------------------------------------------- 1 | /*prg to find biggest of 2nums using if */ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b; 7 | clrscr(); 8 | printf("\n enter any two nums"); 9 | scanf("%d%d",&a,&b); 10 | if(a>b) 11 | printf("\n ais big"); 12 | if(a 3 | #include 4 | void main() 5 | { 6 | int n; 7 | clrscr(); 8 | printf("\n enter any number"); 9 | scanf("%d",&n); 10 | (n>0)?printf("positive number"):printf("negative number"); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /VIJAY2.CPP: -------------------------------------------------------------------------------- 1 | /*programme to find basic arthiematic operstions*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b; 7 | clrscr(); 8 | printf("\n enter 2 numbers"); 9 | scanf("%d%d",&a,&b); 10 | printf("\n sum=%d",(a+b)); 11 | printf("\n subration=%d",(a-b)); 12 | printf("\n product=%d",(a*b)); 13 | printf("\n division=%d",(a/b)); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /VIJAY20.CPP: -------------------------------------------------------------------------------- 1 | /* prgm to print below format 2 | * * * 3 | * * * 4 | * * * 5 | */ 6 | void main() 7 | { 8 | int r,c; 9 | clescr(); 10 | for(r=1;r<=3;r++) 11 | { 12 | for(c=1;c<=3;c++) 13 | } 14 | printf("\t"); 15 | } 16 | printf("\n"); 17 | getch(); 18 | } -------------------------------------------------------------------------------- /VIJAY21.CPP: -------------------------------------------------------------------------------- 1 | /* prgm to read 5 nums and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a[5],i; 7 | clrscr(); 8 | printf("\nenter 5 nums"); 9 | for(i=0;i<5;i++) 10 | { 11 | scanf("%d",&a[i]); 12 | } 13 | printf("\n entered 5 nums"); 14 | for(i=0;i<=5;i++) 15 | { 16 | printf("\n%d",a[i]); 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /VIJAY23.CPP: -------------------------------------------------------------------------------- 1 | /* prgm to read 5 nums and print the same*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a[5],i; 7 | clrscr(); 8 | printf("\nenter 5 nums"); 9 | for(i=0;i<5;i++) 10 | { 11 | scanf("%d",&a[i]); 12 | } 13 | printf("\n entered 5 nums"); 14 | for(i=0;i<=5;i++) 15 | { 16 | printf("\n%d",a[i]); 17 | } 18 | getch(); 19 | } 20 | -------------------------------------------------------------------------------- /VIJAY4.CPP: -------------------------------------------------------------------------------- 1 | /* programme to swap two numbers using dummy variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,temp; 7 | clrscr(); 8 | printf("\n enter 2 nums"); 9 | scanf("\%d%d",&a,&b); 10 | printf("\n before swapping a=%d \t b=%d",a,b); 11 | temp=a; 12 | a=b; 13 | b=temp; 14 | printf("\n after swapping a=%d\t b=&d", a,b); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /VIJAY6.CPP: -------------------------------------------------------------------------------- 1 | /* programme to swap two numbers without using dummy variable*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b; 7 | clrscr(); 8 | printf("\n enter two nums"); 9 | scanf("%d%d",&a,&b); 10 | printf("\n before swapping a=%d \t b=%d",a,b); 11 | a=a+b; 12 | b=a-b; 13 | a=a-b; 14 | printf("\n after swapping a=%d \t b=%d", a,b); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /VIJAY7.CPP: -------------------------------------------------------------------------------- 1 | /* programme to find sum and average of three numbers*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a,b,c,sum; 7 | float avg; 8 | clrscr(); 9 | printf("\n enter three numbers"); 10 | scanf("%d%d%d",&a,&b,&c); 11 | sum=a+b+c; 12 | avg=(float)sum/3;//type casting method 13 | printf("\n sum=%d",sum); 14 | printf("\n average=%f",avg); 15 | getch(); 16 | } -------------------------------------------------------------------------------- /VIJAY8.CPP: -------------------------------------------------------------------------------- 1 | /* programme to demonstrate increment operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a=10,b=20; 7 | clrscr(); 8 | printf("\n before incrementing a=%d \t b=%d",a,b); 9 | printf("\n after incrementing a=%d",a++); 10 | printf("\n a=%d",a); 11 | printf("\n b=%d",++b); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /VIJAY9.CPP: -------------------------------------------------------------------------------- 1 | /* programme to demonstrate decrement operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int a=10,b=20; 7 | clrscr(); 8 | printf("\n before decrementing a=%d\t b=%d", a,b); 9 | printf("\n after incrementing a=%d", a--); 10 | printf("\n a=%d",a); 11 | printf("\n b=%d",b); 12 | getch(); 13 | } -------------------------------------------------------------------------------- /VIRT-CLS.CPP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/VIRT-CLS.CPP -------------------------------------------------------------------------------- /VISHWA.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main() 4 | { 5 | clrscr(); 6 | printf("VISHWANATH. KAMADOLLI\n"); 7 | printf("AT: ADARAGUNCHI\n"); 8 | printf("TQ: HUBLI\n"); 9 | getch(); 10 | } 11 | -------------------------------------------------------------------------------- /VOTING.C: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void main() 5 | { 6 | int age; 7 | clrscr(); 8 | printf("Enter your age to know whether you are eligible for voting or not.\n"); 9 | scanf("%d",&age); 10 | (age>=18)?printf("\t%d YOU ARE ELIGIBLE",age):printf("\t%d YOU ARE NOT ELIGIBLE",age); 11 | getch(); 12 | } -------------------------------------------------------------------------------- /VS1.CPP: -------------------------------------------------------------------------------- 1 | //prg to display a simple message 2 | #include 3 | #include 4 | void main() 5 | { 6 | clrscr(); 7 | cout<<"All"< 4 | #include 5 | void main() 6 | { 7 | int year; 8 | clrscr(); 9 | cout<<"enter the year"; 10 | cin>>year; 11 | (year%4==0)?cout<<"\n Leap Year ":cout<<"\n Not a leap year"; 12 | 13 | getch();} -------------------------------------------------------------------------------- /VS12.CPP: -------------------------------------------------------------------------------- 1 | /*program to demo increment operator*/ 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=10,j=20; 7 | clrscr(); 8 | cout<<"\n value of i"< 3 | #include 4 | void main() 5 | { 6 | int i=10,j=20; 7 | clrscr(); 8 | cout<<"\n value of i"< 3 | #include 4 | void main() 5 | { 6 | int i=30,j=20; 7 | clrscr(); 8 | if(i>j) 9 | cout<<"\n i is big"; 10 | if(i 3 | #include 4 | void main() 5 | { 6 | int n; 7 | clrscr(); 8 | cout<<"\n Enter any no"; 9 | cin>>n; 10 | if(n%2==0) 11 | cout<<"\n even no"; 12 | else 13 | cout<<"\n odd no"; 14 | 15 | getch(); 16 | } -------------------------------------------------------------------------------- /VS2.CPP: -------------------------------------------------------------------------------- 1 | // prg to perform basic airthematic operator 2 | #include 3 | #include 4 | void main() 5 | { 6 | float a,b; 7 | clrscr(); 8 | cout<<"enter two numbers"; 9 | cin>>a>>b; 10 | cout<<"\n sum="<<(a+b); 11 | cout<<"\n sub="<<(a-b); 12 | cout<<"\n product="<<(a*b); 13 | cout<<"\n division="<<(a/b); 14 | getch(); 15 | } -------------------------------------------------------------------------------- /VS20.CPP: -------------------------------------------------------------------------------- 1 | //prg to print nums 1 to 10 2 | #include 3 | #include 4 | void main() 5 | { 6 | int i=1; 7 | clrscr(); 8 | while(i<=10) 9 | { 10 | cout< 3 | #include 4 | void main() 5 | { 6 | int i=10; 7 | clrscr(); 8 | while(i>=1) 9 | { 10 | cout< 3 | #include 4 | void main() 5 | { 6 | int i=2; 7 | clrscr(); 8 | while(i<=20) 9 | { 10 | cout< 3 | #include 4 | void main() 5 | { 6 | int i=5; 7 | clrscr(); 8 | while(i<=100) 9 | { 10 | cout< 3 | #include 4 | void main() 5 | { 6 | int i=1; 7 | clrscr(); 8 | while(i<=100) 9 | { 10 | if(i%3==0 && i%5==0) 11 | cout< 3 | #include 4 | void main() 5 | { 6 | int i=1,fact=1,n; 7 | clrscr(); 8 | cout<<"\n enter any no"; 9 | cin>>n; 10 | 11 | while(i<=n) 12 | { 13 | fact=fact*i; 14 | i++; 15 | } 16 | cout<<"Factorial of a given no="< 3 | #include 4 | void main() 5 | { 6 | int i=1,sum=0,n; 7 | clrscr(); 8 | cout<<"\n enter any no"; 9 | cin>>n; 10 | 11 | while(i<=n) 12 | { 13 | sum=sum+i; 14 | i++; 15 | } 16 | cout<<"sum of N nos="< 3 | #include 4 | #define pi 3.142 5 | void main() 6 | { 7 | float ar,r; 8 | clrscr(); 9 | cout<<"enter radius"; 10 | cin>>r; 11 | ar=pi*r*r; 12 | cout<<"\n area of a circle="< 4 | #include 5 | void main() 6 | { 7 | float ar,l,b; 8 | clrscr(); 9 | cout<<"Enter length and breadth"; 10 | cin>>l>>b; 11 | ar=l*b; 12 | cout<<"\n Area of a rectangle="< 3 | #include 4 | void main() 5 | { 6 | int a[5],i; 7 | clrscr(); 8 | cout<<"\n enter 5 nums"; 9 | for(i=0;i<5;i++) 10 | { 11 | cin>>a[i]; 12 | } 13 | cout<<"entered 5 nums are\n"; 14 | for(i=0;i<5;i++) 15 | { 16 | cout<<"\n"< 3 | #include 4 | void main() 5 | { 6 | float ar,h,b; 7 | clrscr(); 8 | cout<<"Enter base and height"; 9 | cin>>b>>h; 10 | ar=0.5*b*h; 11 | cout<<"\n Area of a triangle="< 3 | #include 4 | void main() 5 | { 6 | float p,t,r,si; 7 | clrscr(); 8 | cout<<"Enter p t r values"; 9 | cin>>p>>t>>r; 10 | si=(p*t*r)/100; 11 | cout<<"\n Simple Interest="< 3 | #include 4 | void main() 5 | { 6 | int a,b,c; 7 | float sum,avg; 8 | clrscr(); 9 | cout<<"enter three numbers:"; 10 | cin>>a>>b>>c; 11 | sum=a+b+c; 12 | avg=sum/3; 13 | cout<<"\n sum="< 3 | #include 4 | void main() 5 | { 6 | int a,b; 7 | clrscr(); 8 | cout<<"enter two numbers:"; 9 | cin>>a>>b; 10 | (a>b)?cout<<"\n a is big ":cout<<"\n b is big"; 11 | getch(); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /VS9.CPP: -------------------------------------------------------------------------------- 1 | /*program to check whether given no is even or odd using 2 | conditional operator*/ 3 | #include 4 | #include 5 | void main() 6 | { 7 | int n; 8 | clrscr(); 9 | cout<<"enter any numbers:"; 10 | cin>>n; 11 | (n%2==0)?cout<<"\n Even no ":cout<<"\n odd no"; 12 | 13 | getch(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /c programs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /c++ new.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/c++ new.docx -------------------------------------------------------------------------------- /c_final.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/c_final.docx -------------------------------------------------------------------------------- /c_prog.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/c_prog.docx -------------------------------------------------------------------------------- /ch01.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/ch01.ppt -------------------------------------------------------------------------------- /ch4_additional.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/ch4_additional.ppt -------------------------------------------------------------------------------- /ch5_additional.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/ch5_additional.ppt -------------------------------------------------------------------------------- /ch6_additional.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/ch6_additional.ppt -------------------------------------------------------------------------------- /ch7_additional.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/ch7_additional.ppt -------------------------------------------------------------------------------- /ch9_additional.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/ch9_additional.ppt -------------------------------------------------------------------------------- /clockp5.cpp: -------------------------------------------------------------------------------- 1 | //display multiplication table up to 10 using for loop 2 | 3 | #include 4 | #include 5 | 6 | void main() 7 | { 8 | int i,n,result; 9 | clrscr(); 10 | printf("\n\tenter number to display multiplication table"); 11 | scanf("%d",&n); 12 | for(i=1;i<=10;i++) 13 | { 14 | result=n*i; 15 | printf("\n\t%dX%d=%d",n,i,result); 16 | } 17 | getch(); 18 | } -------------------------------------------------------------------------------- /lecture02-cpp.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RashmivernekarN/C-Program2/6791c5c986d388fd728bd27f3250467af6867c4b/lecture02-cpp.ppt --------------------------------------------------------------------------------