Skip to content
View in the app

A better way to browse. Learn more.

Kaspersky Support Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

C program detected as trojan?

i was doing some simple coding for some homework, and when i execute, i mistakenly add the wrong type of varyable when testing, asked for number, gave caracter. suddenly kasresresky detected a "trojan" on the resulting executable, and proceded to ask me for a full cleanup, i clean, whatever, but now the porgram wont work, and everytime i comple it, it just stops visual studio code from executing it, i added it to exceptions, but it may be better if the problem was solved. if its any of help, here is the c code: 

#include <stdio.h>
int x=0,i=0,j=0;
float total=0;
typedef struct {
    char name[4][50];
    int numcuenta;
    float calificaciones[3];
} Alumno;
 
int main(void)
{
    do{
    puts ("cuantos alumnos deseas introducir, maximo 30: ");
    scanf ("%d",&x);
    } while (x<0||x>30);
    Alumno alumnos[x];
    for (i=0;i<x;i++)
    {
    printf ("alumno: %d ",i+1);
    puts ("introduzca el primer nombre: ");
    scanf("%49s",&alumnos[i].name[0]);
    puts ("introduzca el segundo nombre: ");
    scanf("%49s",&alumnos[i].name[1]);
    puts ("introduzca el primer apellido: ");
    scanf("%49s",&alumnos[i].name[2]);
    puts ("introduzca el segundo apellido: ");
    scanf("%49s",&alumnos[i].name[3]);
    puts ("introduzca su numero de cuenta: ");
    scanf("%d",&alumnos[i].numcuenta);
    for (j=0;j<3;j++)
    {
        printf("introduzca su calaficacion en la materia %d: ",j+1);
        scanf ("%f",&alumnos[i].calificaciones[j]);
    }
    }
 
    for (i=0;i<x;i++)
    {
        puts ("la calificacion del alumno:");
        for (j=0;j<4;j++)
        {
            printf(" %s",alumnos[i].name[j]);
        }
        printf(" %d ",alumnos[i].numcuenta);
 
        puts (" es");
        for (j=0;j<3;j++)
        {
           total=total + alumnos[i].calificaciones[j];
        }
        total=total/3;
        printf("%.2f \n",total);
        total=0;
    }
 
}

Featured Replies

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.