falla de segmentación usando scanf con entero
Recibo un error de segmentación en mi código C cuando intento leer la entrada entera del usuario con la siguiente función:
int userChoice = 0, tS;
float tR, tW, tP, aP;
char title[35], title2[35];
Book *curr;
while (userChoice != 9) {
printf("1. Determine and print total revenue\n");
printf("2. Determine and print total wholesale cost\n");
printf("3. Determine and print total profit\n");
printf("4. Determine and print total number of sales\n");
printf("5. Determine and print average profit per sale\n");
printf("6. Print book list\n");
printf("7. Add book\n");
printf("8. Delete book\n");
printf("9. Exit the program\n");
scanf("%d", userChoice);
...
...
Cada vez que ejecuto mi programa, me permite ingresar el número que se asignará a userChoice, pero seg falla inmediatamente después. ¿Alguna ayuda? ¡Gracias!
Editar: El error exacto que obtengo i:
Program received signal SIGSEFV, Segmentaion fault.
0x0000003503256f50 in _IO_vfscanf_internal () from /lib64/libc.so.6