Programming Interview Questions

Sub Category
Questions
Answers
Last Updated
60
761
Nov 27th, 2018
23
111
Jul 14th, 2017
26
95
Apr 5th, 2018
27
85
Jul 25th, 2017
66
620
May 21st, 2018
101
1439
Mar 26th, 2018
25
246
Sep 11th, 2018
63
140
Nov 22nd, 2017
21
81
Apr 27th, 2017
46
319
Feb 3rd, 2016

Showing Questions 21 - 25 of 25 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page:
  •  

    Secure Language

    Which Language is more secure - Java or C?

    Stefan Alenius

    • Jun 7th, 2017

    The language does not matter as much as the developers involved. Yes, there is a difference between the languages, just as it is a difference between a monkey wrench and a screwdriver, but both are ju...

    turnball

    • Apr 28th, 2016

    Bad question really since you can write horribly insecure software under each but if all things are considered equal then Id say C is more inherently "secure." Still a bad question since you can write some spotty product in either language.

  •  

    Logic and Design

    Number Analysis Program

    Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display the following data:

    • The lowest number in the array
    • The highest number in the array
    • The total of the numbers in the array
    • The average of the numbers in the array

    Teja

    • Oct 8th, 2017

    int arr[] = {4,2,6,1,7,12,10,11}; int min= arr[0]; int max= arr[0]; int total = 0; int avg; for(int i=0; i arr[i]) { min = arr[i]; } else if(max < arr[i]) { max = arr[i];...

    Shubhangi

    • Oct 5th, 2017

    I inserted a code but how to get exact decimal point answer for avg,I didnt get .

    Code
    1. #include<stdio.h>
    2. main()
    3. {
    4. int arr[10];
    5. int i,size;
    6. size=sizeof(arr)/sizeof(arr[0]);
    7. printf("enter the array elemrnt......
    8. ");
    9.  
    10. for(i=0;i<size;i++)
    11. //scanf("%d",&arr[i]);
    12. arr[i]=rand()%100;
    13.  
    14. for(i=0;i<size;i++)
    15. printf("%d      ",arr[i]);
    16. ");
    17.  
    18. //lowest number....
    19. int temp=arr[0];
    20. for(i=1;i<size;i++)
    21. {
    22. if(temp>arr[i])
    23. temp=arr[i];
    24. else
    25. continue;
    26. }
    27. printf("lowest element=%d
    28. ",temp);
    29. //highewst numer
    30.  temp=arr[0];
    31. for(i=1;i<size;i++)
    32. {
    33. if(temp<arr[i])
    34. temp=arr[i];
    35. else
    36. continue;
    37. }
    38. printf("highest element=%d
    39. ",temp);
    40.  
    41. //toatal of numbers
    42. int sum =0;
    43. for(i=0;i<size;i++)
    44. {
    45. sum=sum+arr[i];
    46. }
    47. printf("total of an array:%d
    48. ",sum);
    49. //average
    50. int avg;
    51. avg=sum/size;
    52. printf("average=%d
    53. ",avg);
    54.  
    55. }
    56.  

  •  

    Generate no.between 32 to 99

    Consider the following number
    45*45=2025 and
    20+25=45.
    Write a program to generate no.between 32 to 99 that satisfy the above problem.

    gyanendra verma

    • Aug 20th, 2017

    "c #include void main() { int n1,n2,i,temp,b,j,c,check,count=0,a[4]; clrscr(); printf("enter starting number: "); scanf("%d",&n1); //n1=32 printf("enter ending number: "); ...

    anonymous

    • Apr 5th, 2017

    Basically the same, but in node :)

    Code
    1. var desired = [];
    2. for(var i = 32; i <= 99; i++) {
    3.  
    4.   var value = i * i;
    5.   var split1 = parseInt(value / 100);
    6.   var split0 = value % 100;
    7.   if(split1 + split0 == i) {
    8.     desired.push(i);
    9.   }
    10. }
    11.  
    12. console.log("Desired values: " + desired);

  •  

    Write a program to read a four digit integer and print the sum of its digits.Write a program that reads a floating point number and then displays the right-most digit of the integral part of the number.

    Omar Faruq

    • Nov 6th, 2023

    #include <stdio.h> int main(void) { int sum,digit1,digit2,digit3,digit4; printf("enter four digit integer: "); scanf("%d", &digit1,&digit2,&digit3,&digit4); digit1=(digit1%1000...

    gaurav kumar jaiswal

    • Aug 31st, 2014

    Write a c++ program to the sum and product of digits of an integers

  •  

    Print Sum of Digits

    Write a function to print sum of the digits in a given integer n without converting it to String. For example : if n = 1234 the function should return 1+2+3+4 = 10 if n = 15 the function should return 1+5 =6 if n = 5 the function should return 5.

    sravani reddy

    • Sep 21st, 2017

    Code
    1. #include<stdio.h>
    2. int main()
    3. {
    4. int rem,sum=0,n;
    5. printf("enter the number:");
    6. scanf("%d
    7. ",&n);
    8. while(n!=0)
    9. {
    10. rem=n%10;
    11. sum=sum+rem;
    12. n=n/10;
    13. }
    14. printf("the sum of digits of a number is %d",sum);
    15. return 0;
    16. }

    Shasan

    • Mar 29th, 2016

    "c# public static int Sum() { int n = 1235678; int n1 = 0; int f = 0; while (n!= 0) { ...

Showing Questions 21 - 25 of 25 Questions
First | Prev | Next | Last Page
Sort by: 
 | 
Jump to Page: