Vignan_First_Year_Practice_Part_5_2023



  1. Dear First Year students of Vignan,
  2. The Practice link Five (I_Can_do_Coding_part_5) will be conducted on 13th Jan 2023 to 16rd Jan 2023.
  3. You are given 14 questions and 100 hours to complete them. 
  4. Questions will be on Patterns. you can attempt it only in C language.
  5.  When you the Start coding, please give your Roll No instead of Name.
  6. Please participate in the following


 Link: https://assessment.hackerearth.com/challenges/college/I_Can_do_Coding_5/

netaji gandi Friday, January 13, 2023
Vignan_First_Year_Practice_Part_4_2023



  1. Dear First Year students of Vignan,
  2. The Practice link Four (I_Can_do_Coding_part_4) will be conducted on 10th Jan 2023 to 13rd Jan 2023.
  3. You are given 13 questions and 100 hours to complete them. 
  4. Questions will be on Loops. you can attempt it only in C language.
  5.  When you the Start coding, please give your Roll No instead of Name.
  6. Please participate in the following 

Link: I_Can_Do_Coding_4 | Programming challenges in January, 2023 on HackerEarth

netaji gandi Tuesday, January 10, 2023
Vignan_First_Year_Practice_Part_3_2023

 



  1. The Practice link Three (I_Can_do_Coding_part_3) will be conducted on 6th Jan 2023 to 10rd Jan 2023.
  2. You are given 15 questions and 100 hours to complete them. 
  3. Questions will be on Conditional statements. you can attempt it only in C language.
  4.  When you the Start coding, please give your Roll No instead of Name.
  5. Please participate in the following


 Link: I_Can_Do_Coding_Part_3 (hackerearth.com)

netaji gandi
Vignan_First_Year_Practice_Part_2

  1. Dear First Year students of Vignan,
  2. The Practice link TWO (I_Can_do_Coding_part_2) will be conducted on 4th Jan 2023 to 8rd Jan 2023.
  3. You are given 10 questions and 100 hours to complete them. 
  4. Questions will be on basic coding. you can attempt it only in C language.
  5.  When you the Start coding, please give your Roll No instead of Name.
  6. Please participate in the following Link: 

                            I_Can_Do_Coding_Part_2 (hackerearth.com)

netaji gandi Wednesday, January 4, 2023
R20 & R19 OBJECT ORIENTED PROGRAMMING THROUGH C++

R20 OBJECT ORIENTED PROGRAMMING THROUGH C++- Previous Question papers



Regulation Month & Year Download File
R20 July -2022-Supplementary 1 Sets
R20 Feb -2022-Regular 1 Set
R19 Sep -2021-Supplementary 1 Set
R19 Mar -2021-Regular 4 Sets

netaji gandi Tuesday, January 3, 2023
PPSC EXERCISE-16

 

EXERCISE-16

1. Write a program in C to append multiple lines at the end of a text file.
SOURCE CODE:
#include<stdio.h>
int main() {
FILE *fp;
char ch;
fp = fopen("Sample.txt", "w");
printf("Enter the text press ctrl+z for end of file: \n");
while ((ch=getchar())!=EOF) {
putc(ch,fp);
}
fclose(fp);
fp = fopen("Sample.txt", "a");
printf("Enter the text to append to a file press ctrl+z for end of file: \n");
while ((ch=getchar())!=EOF) {
putc(ch,fp);
}
fclose(fp);
fp = fopen("Sample.txt", "r");
printf("File content after appending : \n");
while ((ch=fgetc(fp))!=EOF) {
putchar(ch);
}
printf("\n");
fclose(fp);
return 0;
}
OUTPUT:
Enter the text press ctrl+z for end of file:
Hello
^Z
Enter the text to append to a file press ctrl+z for end of file:
Welcome
here you learn file concepts.
^Z
File content after appending :
Hello
Welcome
here you learn file concepts.

2. Write a program in C to copy a file in another name.
SOURCE CODE:
#include<stdio.h>
int main() {
FILE *fp1, *fp2;
char ch;
fp1 = fopen("Sample.txt", "w");
printf("Enter the text press ctrl+z for end of file: \n");
while ((ch=getchar())!=EOF) {
putc(ch,fp1);
}
fclose(fp1);
fp1 = fopen("Sample.txt", "r");
fp2 = fopen("CopiedFile.txt", "w");
    while((ch=fgetc(fp1))!=EOF){
        putc(ch,fp2);
    }
    putc(ch,fp2);
    fclose(fp1);
    fclose(fp2);
    fp2 = fopen("CopiedFile.txt", "r");
    printf("Copied text is : \n");
    while((ch=fgetc(fp2))!=EOF){
        putchar(ch);
    }
    fclose(fp2);
    printf("\n");
    return 0;
}
OUTPUT:
Enter the text press ctrl+z for end of file:
welcome
learn file concepts
^Z
Copied text is :
welcome
learn file concepts

3. Write a program in C to remove a file from the disk.
SOURCE CODE:
#include<stdio.h>
int main() {
FILE *fp;
char ch, fileName[30]="Sample.txt";
int status;
fp = fopen(fileName, "w");
printf("Enter the text press ctrl+z for end of file: \n");
while ((ch=getchar())!=EOF) {
putc(ch,fp);
}
fclose(fp);
    fp = fopen(fileName,"r");
    if(fp==NULL){
        printf("File doesn't exists.\n");
        return 0;
    }
    else{
        printf("File exists.\n");
    }
    fclose(fp);
    status = remove(fileName);
    if(status==0)
        printf("%s file is deleted.",fileName);
    else
        printf("Unable to delete %s file.",fileName);
    return 0;
}
OUTPUT:
Enter the text press ctrl+z for end of file:
hello
^Z
File exists.
Sample.txt file is deleted.

netaji gandi Monday, January 2, 2023
PPSC EXERCISE-15

 

EXERCISE-15

1. Write a program in C to check whether a number is a prime number or not using the function.
SOURCE CODE:
#include<stdio.h>
void isPrime(int);
int main(){
    int n;
    printf("Enter number : ");
    scanf("%d",&n);
    isPrime(n);
    return 0;
}
void isPrime(int n){
    int i, c=0;
    for(i=1;i<=n/2;i++){
        if(n%i==0)
            c++;
    }
    if(c==1)
        printf("Given number %d is a prime number.\n",n);
    else
        printf("Given number %d is not a prime number.\n",n);
}
OUTPUT-1:
Enter number : 5
Given number 5 is a prime number.

OUTPUT-2:
Enter number : 25
Given number 25 is not a prime number.

2. Write a program in C to get the largest element of an array using the function.
SOURCE CODE:
#include <stdio.h>
int large(int[], int);
int main() {
int a[10], i, n;
printf("Enter number of elements to be insert : ");
scanf("%d", &n);
printf("Enter %d elements : ",n);
for (i = 0; i < n; i++)
scanf("%d", &a[i]);
printf("The largest element of the array = %d\n", large(a, n));
return 0;
}
int large(int ary[], int n){
int i, max;
max=ary[0];
for(i=1;i<n;i++){
if(ary[i]>max)
max=ary[i];
}
return max;
}
OUTPUT:
Enter number of elements to be insert : 4
Enter 4 elements : 8 3 4 2
The largest element of the array = 8

netaji gandi

OBJECT ORIENTED PROGRAMMING USING JAVA LAB

Java Programming Lab Experiments VR-23 2025-26 Java Programming Lab Experiments Experiment 1: Fibonacci Sequence The F...